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, 5429👍, 0💬
Popular Posts:
How To Test Transaction Isolation Levels? - MySQL FAQs - Transaction Management: Commit or Rollback ...
Can you explain different software development life cycles -part II? Water Fall Model This is the ol...
interview.FYIcenter.com offers a collections of interview questions and answers for software and Web...
What Articles Have You Read about JUnit? There are a number of JUnit articles that you should read: ...
How To Use "IF" Statements on Multiple Conditions? - Oracle DBA FAQ - Understanding PL/SQL Language ...