PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kai Ming Choi  >  Random Class  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Random Class
Generate a random text with a set of characters
Author: By
Last change:
Date: 4 years ago
Size: 492 bytes
 

Contents

Class file image Download
<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));
?>