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, ∼2597🔥, 0💬
Popular Posts:
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
What are "*..." and "**..." Wildcard Parameters in Function Definitions? If you want to define a fun...
How to attach console to a Running Container using the "docker container exec" command? I want to ge...
How to start Docker Daemon, "dockerd", on CentOS systems? If you have installed Docker on your CentO...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...