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] |