This works great for what I need I have a quick question though, How would you format it in a way to have two next to each other and 5 different rows?
I was thinking for ($i = 0; $i < 5; $i++) { echo ''.$ads[$i].' '.$ads[$i].'<br>'; }
and that formats it how I want BUT the two are the same besides each other. How could I make that same layout but all 10 different links from the array?
Quote:
Originally Posted by cyberxxx
PHP Code:
<table>
<tr>
<?php
$ads = array('<a href="http://www.cnn.com/">CNN</a>', '<a href="http://www.ibm.com/">IBM</a>', '<a href="http://www.microsoft.com/">Microsoft</a>', '<a href="http://www.fhgstore.com/">FHG Store</a>', '<a href="http://www.thesponsorfeeds.com/">The Sponsor Feeds</a>', '<a href="http://www.real-bucks.com/">Real-Bucks</a>');
shuffle($ads);
for ($i = 0; $i < 5; $i++) { echo '<td>'.$ads[$i].'</td>'; }
?>
</tr>
</table>
|