11-27-2007, 02:57 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Posts: 133
Thanks: 6
|
Random Items without a Database
If you ever wanted to show something random without using the database then this is a decent method:
php Code:
<?php$banner[]= array("image.gif", "http://domain.com/"); $banner[]= array("image2.gif", "http://www.domain.domain.co.uk/"); $banner[]= array("image3.gif", "http://search.mysearch.com"); $rand = rand(0, count($banner)- 1); ?><p align= "center"> <a href= <?= $banner[ $rand][ 1]?>><img src= "<?=$banner[$rand][0]?>" alt= "" width= "468" height= "60" border= "0"></a> </p>
More of a little script than a tutorial, thanks :)
|
|
|