View Single Post
Old 02-18-2008, 03:58 PM  
Swish
Confirmed User
 
Swish's Avatar
 
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
Quote:
Originally Posted by k0nr4d View Post
Code:
<?php

$ARRAY = array(
    'sitename1.com' => 'This is a description',
    'sitename2.com' => 'This is a description'
    );

shuffle($ARRAY);
$counter=0; 
foreach ( $ARRAY as $URL => $DESC ) {
    if($counter < 30) {
    print "<a href=\"$URL\">$URL</a> - $DESC\n";
    $counter++;
    }
}
?>
A bit half-assed. I would do this with a mysql db instead.
There are obviously more elegant ways to do this. This was only a simple example.
__________________


Naughty America - Director of Technology
It's a CELEBRATION bitches!! For the hottest content promote Naughty America!
swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com!
Swish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote