note 29996 added to language.types.string
| From: | php-general at lists dot php dot net | Date: | Mon, 03 Mar 2003 16:04:36 +0000 |
| Subject: | note 29996 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44786@lists.php.net to get a copy of this message | ||
Regarding "String access by character":
Apparently if you edit a specific character in a string, causing the string to be non-continuous,
blank spaces will be added in the empty spots.
echo '<pre>';
$str = '0123';
echo "$str\n";
$str{4} = '4';
echo "$str\n";
$str{6} = '6';
echo "$str\n";
This will output:
0123
01234
01234 6
Notice the blank space where 5 should be.
(PHP 4.3.1)
--
http://www.php.net/manual/en/language.types.string.php
http://master.php.net/manage/user-notes.php?action=edit+29996
http://master.php.net/manage/user-notes.php?action=delete+29996
http://master.php.net/manage/user-notes.php?action=reject+29996