Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Access a Specific Character in a String
How To Access a Specific Character in a String? - PHP Script Tips - Understanding String Literals and Operations
✍: FYIcenter.com
Any character in a string can be accessed by a special string element expression:
Here is a PHP script example:
<?php
$string = 'It\'s Friday!';
echo "The first character is $string{0}\n";
echo "The first character is {$string{0}}\n";
?>
This script will print:
The first character is It's Friday!{0}
The first character is I
2007-04-20, 5077👍, 0💬
Popular Posts:
What Does a HTML Document Look Like? A HTML document is a normal text file with predefined tags mixe...
What will be printed as the result of the operation below: #define swap(a,b) a=a+b;b=a-b;a=a-b; void...
How can we implement singleton pattern in .NET? Singleton pattern mainly focuses on having one and o...
How does multi-threading take place on a computer with a single CPU? The operating system's task sch...
What Information Is Needed to Connect SQL*Plus an Oracle Server? - Oracle DBA FAQ - Introduction to ...