如何使用PHP停止向上或向下舍入小数

I am calculating a number which I use in another calculation. the problem is this number could be 67.9699 I want it to say 67.96 without rounding up or down just chop the other digits of. I was hoping the floor function would do this like:

$num2 = floor(($num1/5)*100)/100;

How ever this is still rounding the number up to 67.97 is there a away to stop this. Any help welcome

It's working well for me, try this:

echo floor(67.9699 * 100) / 100;

Demo Online

By the way, number_format() rounds the number.

$num2 = substr($num2,0,5);
echo $num2; 

If you want to use the number again as float

$num2 = floatval($num2);

You can use number_format();

number_format