Login   Register  
PHP Classes
elePHPant
Icontem

File: examples.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Hadar Porat  >  HebCurrency  >  examples.php  >  Download  
File: examples.php
Role: Example script
Content type: text/plain
Description: Examples
Class: HebCurrency
Retrieve currency rates from the Bank Israel
Author: By
Last change:
Date: 2005-06-17 09:46
Size: 562 bytes
 

Contents

Class file image Download
<?
// include the class
include_once('HebCurrency.php');

// English by default
$currenices = new HebCurrency();

// get USD currency
$dollars $currenices -> getCurrency('USD');
print_r($dollars);

// covert 500 NIS to dollars
echo $currenices -> convertTo('USD'500) . '<br />'

// covert 1000 EUR to NIS
echo $currenices -> convertFrom('EUR'887) . '<br />'


// Hebrew names will replace English names
$currenices = new HebCurrency('he');

// get USD currency
$dollars $currenices -> getCurrency('USD');
print_r($dollars);
?>