How to convert float percent number value to integer percent number value in PHP?
Example: 3.8461538461538 % = 4 %
Update:
Here is my code , I coded to get percent value, but I get decimal value, but I need it without decimal value.
$total = array_sum($total_count);
$percent = ($occurs/$total)*100;
echo $percent ;
echo "%";
You can specify in second argument the number of decimal points (default is 0).