Tag Archives: random
Display values from an array in random order
This is a function that randomizes the order of the elements in an array.
Read moreShow random image(s) from a directory
This script is useful if you need to randomly select images from a directory.
Read moreHow to select a random value from an array using a specified range
This function selects randomly a value from an arrray using a specified range.
Read moreCreating a Random Quote Script
This is a Random Quote Script.
<?php
// Credits: http://www.bitrepository.com/
srand((float) microtime() * 10000000); // IF PHP Version < 4.2.0
// Create the array first
$quotes = array();
// Fill it with quotes
$quotes[] = array(’quote’ => ‘Time is money.’,
‘author’ => ‘Benjamin Franklin’);
$quotes[] [...]
Read more