two dimentional problem still there...

From: Date: Fri, 23 Jun 2000 03:00:46 +0000
Subject: two dimentional problem still there...
Groups: php.windows 
Request: Send a blank email to php-windows+get-598@lists.php.net to get a copy of this message
Hi folks! Both of following scripts don't work... seems like the problem is with PHP4 version that I'm running on Win98 with Apache 1.3.12 (Win32) and MySQL 3.22.34 (Win32 Shareware). Zak, you were right!! when I run this code on Unix machine it works fine but not on my machine, now this is driving my nuts. Everything else seems to be working smooth but when it comes to running these scripts I get parse error. Please tell me where the problem is. MySQL directory -> c:\mysql Apache directory -> c:\Apache PHP4 dierectory -> c:\php here are the code snippets... <?php $myarray[0][0] = 'A'; $myarray[0][1] = 'B'; $myarray[0][2] = 'I'; $myarray[1][0] = 'C'; $myarray[1][1] = 'D'; $myarray[1][2] = 'J'; $myarray[2][0] = 'E'; $myarray[3][0] = 'F'; $myarray[3][1] = 'Z'; $myarray[3][2] = 'G'; $myarray[3][3] = 'Q'; $myarray[4][0] = 'H'; reset($myarray); for($x=0; $x<count($myarray); $x++) for($y=0; $y<count($myarray[$x]); ++$y) echo $myarray[$x][$y]; //it gives me parse error on this line ?> ---------- <?php $myarray[0][0] = 'A'; $myarray[0][1] = 'B'; $myarray[0][2] = 'I'; $myarray[1][0] = 'C'; $myarray[1][1] = 'D'; $myarray[1][2] = 'J'; $myarray[2][0] = 'E'; $myarray[3][0] = 'F'; $myarray[3][1] = 'Z'; $myarray[3][2] = 'G'; $myarray[3][3] = 'Q'; $myarray[4][0] = 'H'; reset($myarray); while(list($key,$row) = each($myarray)){ echo "$key "; // parse error on this line while(list($col,$value) = each($row)){ echo "[$col:$value] "; } echo "<br>"; } ?> thanks for you help in advance... Nasir Ali mailto:nasir_786@hotmail.com mailto:nal@mta.ca http://nasirali.cjb.net

« previous php.windows (#598) next »