Bug #1045: disappearing nested arrays

From: Date: Fri, 08 Jan 1999 02:38:35 +0000
Subject: Bug #1045: disappearing nested arrays
Groups: php.dev 
Request: Send a blank email to php-dev+get-3387@lists.php.net to get a copy of this message
From: z-kimmel@uiuc.edu Operating system: NT 4 PHP version: 3.0.5 PHP Bug Type: Parser error Bug description: disappearing nested arrays Here is an interesting bug. The $y array disappears! <?php $s=array(array('a','b','c'), array('1','2','3')); $x = $s[0]; $y = $s[1]; # this works fine print($y[0]); print($y[1]); print($y[2]); $num = count($x); for ($i=0; $i<$num; $i++) { $z[]=$y[i]; } # the following doesn't print anything out--but it should # print out the values of y[0], y[1], and y[2] print($z[0]); print($z[1]); print($z[2]); print("<p>done"); ?> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3387) next »