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 Kalle Sommer Nielsen  >  Money Currency  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Money Currency
Convert money amounts between currencies
Author: By
Last change:
Date: 7 years ago
Size: 277 bytes
 

Contents

Class file image Download
<?php
    
// Assuming that the class is included

    
$api = new MoneyAPI;

    
$from 'USD';
    
$want 'GBP';
    
$total 200;

    
$stream $api->open() or die('Unable to locate stream!');
    
$result $api->convert($stream$from$want$totalfalse4);

    echo(
$result);
?>