Outputting a mysql_fetch_array result
Posted: Tue Apr 27, 2010 11:49 am
Hey everyone, I am trying to display the result set of an array that I got from mysql_fetch_array, like this:
while($imageinfo_array = mysql_fetch_array( $imageinfo_query ))
<?php echo $imageinfo_array['IMAGE_NAME'] ; ?>
<?php echo $imageinfo_array['CATEGORY_TYPE'] ; ?>
etc.
But there is sometimes more than one CATEGORY_TYPE associated with an IMAGE_FILE. I am just looking to print out the image name and then the corresponding categories associated with them, without reprinting the image again.
I'm pretty sure this is common, but I've been at a loss as to an easy way to do it.
Thanks,
JW
while($imageinfo_array = mysql_fetch_array( $imageinfo_query ))
<?php echo $imageinfo_array['IMAGE_NAME'] ; ?>
<?php echo $imageinfo_array['CATEGORY_TYPE'] ; ?>
etc.
But there is sometimes more than one CATEGORY_TYPE associated with an IMAGE_FILE. I am just looking to print out the image name and then the corresponding categories associated with them, without reprinting the image again.
I'm pretty sure this is common, but I've been at a loss as to an easy way to do it.
Thanks,
JW