Tools, FAQ, Tutorials:
Assigning a New Character in a String in PHP
How To Assigning a New Character in a String?
✍: FYIcenter.com
The string element expression, $string{index}, can also be used at the left side of an assignment statement. This allows you to assign a new character to any position in a string. Here is a PHP script example:
<?php $string = 'It\'s Friday?'; echo "$string\n"; $string{11} = '!'; echo "$string\n"; ?>
This script will print:
It's Friday? It's Friday!
⇒ Concatenating Two Strings in PHP
⇐ Accessing a Specific Character in String in PHP
2016-10-13, 1738🔥, 0💬
Popular Posts:
How to build a PHP script to dump Azure AD 2.0 Authentication Response? If you are use the Azure-AD-...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....
How to send an FTP request with the urllib.request.urlopen() function? If an FTP server supports ano...
Where to get the detailed description of the JSON.stringify() Function in JavaScript? Here is the de...