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, 1593🔥, 0💬
Popular Posts:
How to convert a JSON text string to an XML document with PHP language? Currently, there is no built...
Where to find tutorials on API Management Services at Azure Portal? Here is a list of tutorials to a...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...