note 29996 modified in language.types.string by colder
| From: | colder@php.net | Date: | Tue, 17 Oct 2006 17:58:52 +0000 |
| Subject: | note 29996 modified in language.types.string by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118632@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.
--was--
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://php.net/manual/en/language.types.string.php