Php/Mysql not working in specific browsers?

I’ve not seen or heard of this situation before and search engine queries have come up empty. Since PHP and Mysql are server based how can a code executing in one browser (I.E.) work and not work in others (FireFox, Chromium)?
I’ve traced the problem to one line of code working in IE but not in the others … here it is:

'while($catagoryListing && $catagoryLine = $db->fetchAssocArray($catagoryListing)){'If I comment out the line (and the closing bracket) and manually insert the one, single value it retrieves then the script will display in the other browsers.
I’ve never heard of such a thing! Either my queries have worked or they haven’t based on connectivity, syntax, etc but never by browser. I’ve inherited the project. Should I rewrite the database connection code for the whole site? I’m stumped!
Any troubleshooting ideas?

test what value $catagoryListing has immediately before that line - presumably the value will be different in IE to the other browsers - then work back through the code to where it is set to see what value is being passed from the browser differently to cause the problem.