PHP (or javascript) random link/description?

Sean G

New member
javascript would be fine too, if it was quick and efficient... not sure on javascript...
Hi,

On my site, on the side i have a column with links to related sites, with a short description underneath them.
However, i would like to have dynamic content in there, especially as i have over 5 sites to link to.

Now, i can find scripts on google that will give a random link from an array, but if i had several of these, it would be possible that two or more items are the same.

So how would i go about doing this in php (have it as an SSI include in html documents)? A database is a possibility, although i believe this would be a waste of resources if it had to read from that every time someone opened a page, and could slow down the loading of the page.

So can anyone write me a simple PHP scripts that outputs 5 different links? I can change the formatting etc, i know how to work my way around a simple pre-made script, but i'd like it to be like this:
-Site Title that links to the website
-Short description of Site
5 times in a row...

Thanks in advance to any (non-spam :P) answers... :)
Rabiul K:
thanks for the answer, but it confuses me slightly... :S
 
Back
Top