primefalcon Posted September 18, 2007 Report 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 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now