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, ∼2203🔥, 0💬
Popular Posts:
How to access URL template parameters from "context.Request.Matched Parameters"object in Azure API P...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
Where to get a real Atom XML example? You can follow this tutorial to get a real Atom XML example: 1...
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...