I am trying to calculate how much the commission is off of an array I am pulling from an API. The following is my code.
$mst_per_off_base=   $pri['base']  * '.01'; // calculate 1% of the base price
$gr[] = $pri['com'] - $mst_per_off_base ; // deduct the 1% off of the com
echo array_sum($gr); // total of all after deduction
$pri['base'] and $pri['com'] represent more than one number. The problem is that it is showing the math. 
For example, if $gr equals 50.85 then it is echoing 50.85101.7152.55 I would like it just to just show 152.55.
Any suggestion?
 
     
    