note 51224 added to language.types.array
| From: | keystormatgmail at osu1 dot php dot net | Date: | Wed, 23 Mar 2005 21:13:38 +0000 |
| Subject: | note 51224 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86862@lists.php.net to get a copy of this message | ||
In reply to arhipov at donotspam at narod dot ru. This is not a strange behaviour, this is the
inbuilt string char index reference:
<?php
$string = 'Hello';
echo $string[1]; //This will print 'e' on screen
echo $string['random']; //This will return 'H' since the expected integer index
was not found and the string 'random' is int 0 (=> H)
?>
----
Manual Page -- http://www.php.net/manual/en/language.types.array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51224
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51224&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51224&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51224&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51224&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51224&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51224&report=yes
Search -- http://master.php.net/manage/user-notes.php