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, Quote 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']; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/87090-loop-help/#findComment-445409 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.