Vivid Lust Posted January 21, 2008 Share Posted January 21, 2008 Im trying to solect the whole column "url", and display contents row by row: #Display images $query = mysql_query( "SELECT url FROM gallery") or die(mysql_error()); $row = mysql_fetch_assoc($query); while ($row = mysql_fetch_assoc($query)){ echo $row['url']; The problem is, is that only one URL is displayed, Link to comment https://forums.phpfreaks.com/topic/87090-loop-help/ Share on other sites More sharing options...
rhodesa Posted January 21, 2008 Share Posted January 21, 2008 It should look something like this: <?php $query = mysql_query("SELECT url FROM gallery") or die(mysql_error()); while ($row = mysql_fetch_assoc($query)){ echo $row['url']; } ?> Link to comment https://forums.phpfreaks.com/topic/87090-loop-help/#findComment-445409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.