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, ∼2074🔥, 0💬
Popular Posts:
Where can I download the EPUB 2.0 sample book "The Metamorphosis" by Franz Kafka? You can following ...
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...
How to install "C++/CLI Support" component in Visual Studio? I need to build my Visual Studio C++/CL...
Where to find tutorials on RSS specifications? I want to learn it to describe my API services. Here ...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...