|
-
Aug 4th, 2015, 05:52 AM
#1
Thread Starter
Banned
How To Assigning a New Character in a String using PHP?
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
";
$string{11} = '!';
echo "$string
";
?>
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|