Passing arrays

From: Date: Tue, 23 May 2000 17:58:04 +0000
Subject: Passing arrays
Groups: php.db 
Request: Send a blank email to php-db+get-67@lists.php.net to get a copy of this message
I'm still struggling to understand why I can't send a query result to be processed in another script. In the code below both print routines work fine in the same script file - the first using $row and the second using $profilesarray. In 'aa.phtml' however, printing the first five elements of $profilesarray displays: A;r;r;a;y; Why can't I or how can I pass an array to a second file? All donations gratefully received Code: $result = mysql_query("Select * from $TA"); $rows = mysql_num_rows($result); $fields = mysql_num_fields($result); for ($i=1; $i<=$rows; $i++) { $row = mysql_fetch_row($result); $profilesarray=$row; for ($j=0; $j<5; $j++) { echo "$row[$j]; "; } echo "<P>"; } echo "<a href='aa.phtml?profilesarray=$profilesarray&rows=$rows'>Pass</a>"; echo "<P>"; for ($i=1; $i<=$rows; $i++) { for ($j=0; $j<3; $j++) { echo "$profilesarray[$j]; "; } Best regards Mick Lloyd mjl@consultingrooms.com

« previous php.db (#67) next »