Website Tutorials
Recipes
Entertainment Reviews
Home Remedies
Game Codes and Cheats
PHP Coding Tutorials | Submited Feb 23, 2008
Written by: Rev. B.
- Notes -
Basically...
<?php
//For a link
$rand[] = '<a href="URL_HERE"> This is a link </a>';
//For a quote
$rand[] = 'Real knowledge is to know the extent of one's ignorance.';
//For an image
$rand[] = '<img src="IMAGE_URL_HERE" />';
srand ((double) microtime() * 1000000);
$random = rand(0,count($rand)-1);
<? echo "<p>" . $rand[$random] . "</p>"; ?>
?>
<?php include "rand.php"; ?>
More
$rand[] = 'blahh';
![[BoyDrool] [BoyDrool]](/forum/imgs/smilies/BoyDrool.gif)
1