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 Daniel Kushner  >  CurrencyConverter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: An example use of the CurrencyConverter class
Class: CurrencyConverter
Convert to over 150 different currencies
Author: By
Last change:
Date: 2001-11-01 01:39
Size: 522 bytes
 

Contents

Class file image Download
<?php

include('class.CurrencyConverter.inc');


$c = new CurrencyConverter();

$convert = array(array('from' => 'USD''to' => 'ILS'),
                 array(
'from' => 'USD''to' => 'ZWD'),
                 array(
'from' => 'CAD''to' => 'USD')
                );
                     
foreach(
$convert as $arr) {
    echo 
"1 ";
    echo 
$c->getName($arr['from']);
    echo 
" = ";
    echo 
$c->convert($arr['from'], $arr['to']);
    echo 
" ";
    echo 
$c->getName($arr['to']);
    echo 
"<P>";
}

?>