Saturday, July 4th, 2009

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 more

Show random image(s) from a directory

This script is useful if you need to randomly select images from a directory.

Read more

How 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 more

How to select rows randomly

Did you ever need to select rows randomly from your database?

Read more

Creating 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

Generating a random password

This function generates random passwords.It

Read more