Converting numbers to words?

Continuing the discussion from [Solved] Converting numbers to words:

Hello everyone

where I can insert the code ?

thank you very much

Read the original topic. It’s mentioned in the first sentence.

Thank you for your answer, I add it in C: \ Users \ samy.dridi \ Downloads \ \ ip \ application \ views \ invoice_templates \ pdf \ or I add the code in source code (invoicePlane. php) ?

sorry I’m beginner please help me

I found another solution and much easier for me:

<?php $TotalByWords = new NumberFormatter("en", NumberFormatter::SPELLOUT); $num = $invoice->invoice_total; list($int, $dec) = explode('.', $num); ?>

Total: <?php echo $TotalByWords->format($int) . " EUR " . $dec . " ct."; ?>