PHP code example of vahidkaargar / currencies

1. Go to this page and download the library: Download vahidkaargar/currencies 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/ */

    

vahidkaargar / currencies example snippets



use vahidkaargar\Currencies\Currency;

/*
 * There two ways to use 
 * Output must be an array of currencies names
 */
$currencies = currency();
$currencies = Currency::fetch();

/*
 * Give you details of currency
 */
$currencies = currency('USD');
$currencies = Currency::fetch('USD');