Navigation :

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




Site Sponsors :

Bookmark :

Links :

programmershelp
dropshippers
gambling sites

Downloads :

Misc :

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Random image example

This example uses an array to store images and then produces a random number and display the image on the screen

<?php
//an array of 4 images in the same direcory as the script
$images = array("a1.gif","a2.gif","a3.gif","a4.gif");
//generate a random number
srand((double)microtime()*1000000);
$randomno = (rand()%4);
//display image
echo ("<img src=\"$images[$randomno]\">");
?>