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, ∼3034🔥, 0💬
Popular Posts:
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
How to create a VC# class and build it into a library? If you want to create a VC# class and build i...
How to use the "@(...)" expression in Azure API Policy? The "@(...)" expression in Azure API Policy ...