PHP code example of cmontellanob / numeros-en-letras

1. Go to this page and download the library: Download cmontellanob/numeros-en-letras 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/ */

    

cmontellanob / numeros-en-letras example snippets




namespace App\Http\Controllers;

use Illuminate\Http\Request;

use NumerosEnLetras;

class HomeController extends Controller
{
    public function index()
    {
        echo 'Formato #1 ' . NumerosEnLetras::convertir(1988208.99) . '<br>';
        
        echo 'Formato #2 ' . NumerosEnLetras::convertir(1988208.99,'Bolivianos',false,'Centavos') . '<br>';
        
        echo 'Formato #3 ' . NumerosEnLetras::convertir(1988208.99,'Bolivianos',true) . '<br>';
        
    }
}