note 50115 added to function.array

From: Date: Fri, 18 Feb 2005 13:35:57 +0000
Subject: note 50115 added to function.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-85208@lists.php.net to get a copy of this message
Be careful if you need to use mixed types with a key of 0 in an array, as several distinct forms end up being the same key: $a = array(); $a[null] = 1; $a[0] = 2; $a['0'] = 3; $a["0"] = 4; $a[false] = 5; $a[0.0] = 6; $a[''] = 7; $a[] = 8; print_r( $a ); This will print out only 3 values: 6, 7, 8. ---- Manual Page -- http://www.php.net/manual/en/function.array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50115 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50115&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50115&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50115&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50115&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50115&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50115&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85208) next »