note 23441 modified in function.array by vrana

From: Date: Tue, 17 Aug 2004 13:57:03 +0000
Subject: note 23441 modified in function.array by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79712@lists.php.net to get a copy of this message
Be careful not to create an array on top of an already existing variable: <?php $name = "John"; $name['last'] = "Doe"; ?> $name becomes "Dohn" since 'last' evaluates to the 0th position of $name. Same is true for multi-arrays. --was-- Be careful not to create an array on top of an already existing variable: $name = "John"; $name['last'] = "Doe"; $name becomes "Dohn" since 'last' evaluates to the 0th position of $name. Same is true for multi-arrays. http://php.net/manual/en/function.array.php

« previous php.notes (#79712) next »