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, 1470👍, 0💬
Popular Posts:
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...
How to use "link" command tool to link objet files? If you have object files previously compiled by ...
How to use "xml-to-json" Azure API Policy Statement? The "xml-to-json" Policy Statement allows you t...