I would like to round a number to two decimal places in PHP.
PHP code:
$bmi = ($form_state[values][submitted][1] * 703) /
($form_state[values][submitted][10] * $form_state[values][submitted][10]);
$form_values['submitted'][11] = $bmi;
$form_values['submitted_tree'][11] = $bmi;
What is the best way to round the variable $bmi
?
round ($your_variable, 2)