Location: PHPKode > scripts > Random Script > example.php
<pre><?php
//Random Class Example
include "random.class.php";
$random = new Random();

echo "\n RANDOM NUMBER:\n";	//return a random number
for($i=0;$i<10;$i++)
	var_dump($random->random_number(0, 100));

echo "\n RANDOM TEXT:\n";	//return a random text
for($i=0;$i<10;$i++)
	var_dump($random->random_text(20, true, true, true, '='));

echo "\n RANDOM TRUE:\n";	//randomly return true in certain percent possibility
for($i=0;$i<10;$i++)
	var_dump($random->possibility(20));
?>
Return current item: Random Script