Tools, FAQ, Tutorials:
Accessing a Specific Character in String in PHP
How To Access a Specific Character in a String?
✍: 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
⇒ Assigning a New Character in a String in PHP
⇐ Including Array Elements in Double-Quoted Strings in PHP
2016-10-13, ∼4589🔥, 0💬
Popular Posts:
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
How to include additional claims in Azure AD v2.0 id_tokens? If you want to include additional claim...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...
FYIcenter.com Online Tools: FYIcenter JSON Validator and Formatter FYIcenter JSON to XML Converter F...