Hi,
I am using
$row = mysql_fetch_array($result)
i want to be able to count the number of values to use in a loop like this....
( $i = 0 ; $i < number of values ?($result) ; $i++ )
How do i calculate the number of values in the array........? thanks
use sizeof or count...
eg:
for($i = 0 ; $i < sizeof($row) ; $i++) {
i think you'd be better off with:
$num_results = mysql_num_rows($result); for($i=0;$i<$num_results;$i++) { $row = mysql_fetch_array($result); ... }