Can’t get this.
How to determine size of an tep_db_fetch_array inside a while loop?
I would like to do this:
$i=0;
while($a = tep_db_fetch_array($query)){
if($i==5){
// start a div i.e.
}
//do sth here
if($i>=count($a)){
//close the div i.e.
}
$i++;
}
but it is not working, because $a is not the whole array, just a pointer to the actual query result. What i am doing wrong, or how to do it?
2
Answers
Due to FrankZ argument this is the simplest solution:
i was so pretty damn
Try the function tep_db_num_rows, like this: