[snip] For now I am going to use the function array_keys to get the keys to be numerical.....maybe this is the only way to do it? Maybe there is a completely different and simple way to go about this whole problem? [/snip] Without any code Nan it is a little hard to visualize what your issue is, but I think that I can help. Have a look at http://www.php.net/mysql_num_fields If you know the number of columns that are returned (I am supposing that is variable) it may help get you to where you need to go. Also, please post some code (have you thought about joining the PHP mailing list?) along with what you expect the results to be. If we can see where you are starting and where you hope to finish it'll be easier for us to help you.