Location: PHPKode > scripts > Smooth Decrease Class > example.php
<?php
// Smooth Decrease Class Example
require "sd.php";

$sd = new SmoothDecrease(200, 500, 0);
//value start from 200, decrese to 0 after 500 steps, round to interger

while($sd->checkRemain()){//check if steps remaining
	$sd->skip(2);	//skip 2 steps(example only, not necessary)
	echo "<img src='' height='".$sd->getValue()."' width='2' />";
	//read one value, and go to the next step, show by invaild images
}

$sd->clear();	//set the step to the begining (example only, not necessary)
?>
Return current item: Smooth Decrease Class