Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jonas Raoni Soares Silva  >  Advanced Randomizer  >  sample.txt  >  Download  
File: sample.txt
Role: Sample output
Content type: text/plain
Description: Simple output sample
Class: Advanced Randomizer
Retrieve random items based on given probability
Author: By
Last change:
Date: 2004-10-31 15:49
Size: 682 bytes
 

Contents

Class file image Download
For the code bellow, that's the output that i got...

[CODE]
$prExample = new probabilityRandom;

$prExample->add( "I have more chances than everybody :]", 20 );
$prExample->add( "I have good chances", 10 );
$prExample->add( "I'm difficult to appear...", 1 );

for( $x=10; $x--; print $prExample->get() . '<br />' );
[/CODE]

[OUTPUT]
I have more chances than everybody :]
I have more chances than everybody :]
I have more chances than everybody :]
I'm difficult to appear...
I have good chances
I have more chances than everybody :]
I have more chances than everybody :]
I have more chances than everybody :]
I have good chances
I have good chances
[/OUTPUT]