Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Assigning a New Character in a String
How To Assigning a New Character in a String? - PHP Script Tips - Understanding String Literals and Operations
✍: 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!
2007-04-20, 4920👍, 0💬
Popular Posts:
What is the difference between const char* p and char const* p? In const char* p, the character poin...
Describe in detail Basic of SAO architecture of Remoting? For these types of questions interviewer e...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
How is the MVC design pattern used in Struts framework? In the MVS design pattern, there 3 component...
How To Create an Add-to-Bloglines Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News...