Percentage Calculation in PHP in FPDF

I am currently looking to make a percentage calculation on an FPFF based invoice template which contains $total (e.g 1000) and a number value $percentage (e.g. 20)

Ideally I would like this to display as discount

$pdf->Cell(100, 5, ‘Discount’ .$discountresult. ”, 0, ‘L’);

What’s the best way to have this achieved? Some expert advise would be greatly appreciated, thank you

Source: php

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.