PHP Classes

File: examples/getfloats.php

Recommend this page to a friend!
  Classes of Christian Vigh  >  PHP Random.Org API  >  examples/getfloats.php  >  Download  
File: examples/getfloats.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Random.Org API
Generate random values using random.org
Author: By
Last change: Initial release
Date: 2 months ago
Size: 725 bytes
 

Contents

Class file image Download
<?php
   
/**************************************************************************************************************

        getfloats.php -
        Echoes the number of random floats specified by the $count variable.
        The number of desired decimals is given by $decimals.
   
     **************************************************************************************************************/
   
require ( 'examples.inc.php' ) ;

   
$random = new RandomOrg ( $agent_string ) ;
   
$count = 10 ;
   
$decimals = 3 ;
   
$values = $random -> GetFloats ( $count, $decimals ) ;

    echo (
"Getting $count random float values with $decimals decimals :\n" ) ;
    echo (
"\t" . implode ( ', ', $values ) . "\n" ) ;

   
display_statistics ( $random ) ;

For more information send a message to info at phpclasses dot org.