eMonk Posted December 1, 2008 Share Posted December 1, 2008 I want to randomly fetch images + their text into an html table (7 per row max). I haven't got into mysql yet so i'm looking for a pure php solution. HTML Table Format: <table width="730" border="0" cellspacing="5" cellpadding="0"> <tr> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> <td><div align="center"><a href="#"><img src="images/php.gif" width="90" height="120" border="0"></a><br>text</div></td> </tr> </table> I have about 20+ different pages that will be using this code and want each to load their images + text randomly. There won't be more then 50-60 entries for each page. Most will be under 20 entries. A new <tr><td> will have to be created for each 7 displayed. What's the best way of doing this w/o the aid of mysql? Link to comment https://forums.phpfreaks.com/topic/134960-fetching-images-randomly-into-html-table/ Share on other sites More sharing options...
eMonk Posted December 1, 2008 Author Share Posted December 1, 2008 update: i want each to load their images, text + url randomly. Link to comment https://forums.phpfreaks.com/topic/134960-fetching-images-randomly-into-html-table/#findComment-702882 Share on other sites More sharing options...
trq Posted December 1, 2008 Share Posted December 1, 2008 Have you got any code? Or do you want us to write it for you? Link to comment https://forums.phpfreaks.com/topic/134960-fetching-images-randomly-into-html-table/#findComment-702888 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.