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, 1566🔥, 0💬
Popular Posts:
What properties and functions are supported on requests.models.Response objects? "requests" module s...
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...