nathan100 Posted July 4, 2009 Share Posted July 4, 2009 Hi, I am trying to create a very basic friends list. The code is below. However, I am now trying to put the results in to a 5x5 grid.... BUT also if there are more results than 25, then a link saying "view all" .. and then all are shown without reload. Here is what I have so far... <?php // Make a MySQL Connection mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); // Get all the data from the "example" table $result = mysql_query("select statement here") or die(mysql_error()); echo '<div id="following_list">'; while($row = mysql_fetch_array( $result )) { $alt = $row['name']; echo '<span class="vcard">'; echo "<img SRC = ".$row['imgpath']." width=\"25\" height=\"25\" alt=".$alt." title=".$alt."></a>"; echo '</span>'; } ?> Link to comment https://forums.phpfreaks.com/topic/164740-formatting-sql-results-in-set-columns/ Share on other sites More sharing options...
nathan100 Posted July 4, 2009 Author Share Posted July 4, 2009 If this is too much of an ask - even the table grid would really help... totally stuck on it. Link to comment https://forums.phpfreaks.com/topic/164740-formatting-sql-results-in-set-columns/#findComment-868734 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.