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 :

gambling sites
dropshippers
finance products

Downloads :

Misc :

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

Valid XHTML 1.0 Transitional


Valid CSS!


Using the array_rand function

This example shows how to use the array_rand function to pick a random entry from an array

<html>
<body>
<?php
$sites = array("Google" => "www.google.com", "yahoo" => "www.yahoo.com","programmershelp" => "www.proggrammershelp.net");
$randomWebsite = array_rand($sites, 2);
print_r($randomWebsite);
?>
</body>
</html>