You did not give enough codes to be able to figure out what might be the problem.
PHP has been stable enough. It doesn't do wierd thing without you programming it. So if it gives only one row of data, it just means that there's only one row of data.
So you might want to try the following:
1) Do a print_r($data) to see what's inside.
2) If $data is not correct, then check your codes that transfer the query results to the array.
3) If $data is correct, then just after "for ($col=0;$col<count($data[$row]);++$col){", do a
| Code: |
print "data[$row][$col] = ".$data[$row][$col]."\n";
|
Check if the values are correct.
Regards,
/kksou