primefalcon Posted September 18, 2007 Share Posted September 18, 2007 Hi I wrote up a simple random generation script quickly which works as intended, however as is common I have ran into a little problem, here's the code: <?php$blogs_array = array('<li><a href="url">site1</a></li>','<li><a href="url">site2</a></li>','<li><a href="url">site3</a></li>');shuffle ($blogs_array);?><?php for ($i = 0; $i < 3; $i++) { echo "$blogs_array[$i]";}?> I've replaced the array urls with just url for privacy.My problem is that with the script running, the same link can appear twice, is there a way to prevent an entry from appearing more than once? Link to comment Share on other sites More sharing options...
primefalcon Posted September 18, 2007 Author Share Posted September 18, 2007 Nvm Problem solved, don't ask what silly mistake I made Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.