To find 30% of a variable
// $budget = 100;
$thirtypercent = ($budget * 30 /100);
//$thirtypercent will equal 30
Most of the time is *100, but here it is…..
$x = 3;
$y = 15;
$percent = $x/$y;
$percent_friendly = number_format( $percent * 100, 2 ) . '%';