PHP Classes

File: example.php

Recommend this page to a friend!
  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: 17 years ago
Size: 277 bytes


Class file image Download
// 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, $total, false, 4);