Location: PHPKode > scripts > Primes Factory > primes-factory/example4.php
<?php

// This example shows how to the primesfactory class
// for pursuing other computations involving primes.

require_once('primesfactory.php');

$n = $_GET['number'];

$pf = new primesfactory ;

$pf->insert_number( $n ) ;

$primes_count = $pf->primesbefore() ;

echo "The number of primes before <b>$n</b> is <b>$primes_count</b>" ;

?>
Return current item: Primes Factory