note 15217 deleted from language.types.array by philip

From: Date: Sat, 01 Sep 2001 00:32:20 +0000
Subject: note 15217 deleted from language.types.array by philip
Groups: php.notes 
Request: Send a blank email to php-notes+get-17481@lists.php.net to get a copy of this message
Hi, just wanted to add a note on multidimentional arrays.. the parser seems to have problems parsing $var[$x][$y] in some cases, at least with the version I'm using. for ($x=0; $x<$xcount; $x++) { for ($y=0; $y<$ycount; $y++) { echo "test $somearray[$x][$y]n"; } } fails.. it parses $somearray[$x], followed by [$y], which prints: "Array[0], Array[1], ...". Instead, do: $tempvar = $somearray[$x][$y]; echo "test $tempvarn";

« previous php.notes (#17481) next »