PHP code example of secrethash / currency

1. Go to this page and download the library: Download secrethash/currency library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

secrethash / currency example snippets


$currency = new Secrethash\Currency\Currency;

echo $currency->convert(100, 'USD', 'INR');



$currency = new Secrethash\Currency\Currency;
$currency->convert(100, 'USD’, 'INR’);
$currency->convertWith('exchangerate’, 100, 'INR’, 'USD’);

convert(int $amount, string $from, string $to)

convertWith(string $provider, int $amount, string $from, string $to)