I have a script which uses a while loop with mysql to generate a graph however when I do a calculation in a while loop like $height = ceil ($highest / $myrow[hits]); I get an error.
Now this is just a calculation. I am not even using it to affect the GD output but I still get an error and I cannot figure out why. Is there something in GD which doesn't like this?
Thanks
well i think you forgot quotes besides hits:
change this: $height = ceil ($highest / $myrow[hits]);
to this: $height = ceil ($highest / $myrow['hits']);
and if that doesn't work let me know.
More likely there are occasions when $myrow[hits] is equal to 0. And thats impossible. You can't divide by 0 in maths.