1 2 3 4 5 6 7 8 9 10 11
<?php function percentOf($number, $percent){ return $number * ($percent / 100); } $percent = '3.5'; //this is the percentage $order = 400; //then: echo percentOf($order, $percent);
1
14