Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kai Ming Choi  >  Smooth Decrease Class  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Smooth Decrease Class
Generate a series of values that decrease smoothly
Author: By
Last change:
Date: 4 years ago
Size: 506 bytes
 

Contents

Class file image Download
<?php
// Smooth Decrease Class Example
require "sd.php";

$sd = new SmoothDecrease(2005000);
//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)
?>