Recordsetclown
Technical User
I'm new to PHP programming and am having trouble with variable scope. If I echo the value of $data within the following loop, I get the expected values. How can I transfer those values to an array that I can access outside the loop?
while ($data = mysql_fetch_array($result)) {
for ($i=0; $i<$numcols; $i++) {
echo $data[$i];
}
}
while ($data = mysql_fetch_array($result)) {
for ($i=0; $i<$numcols; $i++) {
echo $data[$i];
}
}