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!
Â
⇒Understanding PHP String Literals and Operations
⇒⇒PHP Tutorials
2016-10-13, 1231👍, 0💬
Popular Posts:
What is Azure API Management Publisher Portal 2017 version? Azure API Management Publisher Portal is...
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How to install .NET Framework in Visual Studio Community 2017? I have the Visual Studio Installer in...
How to start Visual Studio Command Prompt? I have Visual Studio 2017 Community version with Visual C...
FYIcenter.com Online Tools: FYIcenter JSON Validator and Formatter FYIcenter JSON to XML Converter F...