Hi
Here is a line of my code
while($row = mysql_fetch_array($result))
I want to get how many columns are in the row. I tried count($row)
but this returned what I think is the number of cells for the whole $results.
i.e there are actually 7 columns, and 2 rows and count($row)
returned 14. I want a function that will return 7.
Can you see where I'm going wrong.
Thanks in advance.
EDIT - Answer found
Passed MYSQL_NUM
as a second parameter to mysql_fetch_array
.
Thanks anyway to everyone's answers.