getPercentage

Navigation:  Development > Function Reference > Helpers > Utility >

getPercentage

Previous pageReturn to chapter overviewNext page

Calculate percentage of a value.

 

App::Utility()->getPercentage(Amount,Percentage);

 

 

Parameter

Description

Amount

Total amount

Percentage amount

% amount

 

 

See bellow example:
 

// Return 80
$per = App::Utility()->getPercentage(400,20);
pre($per);
 
// Return 600
$per = App::Utility()->getPercentage(400,150);
pre($per);