Sapete cosa significa esattamente?
$rat = round ($avg_rating/$avg_total,2);
Non capisco il ,2.
Grazie,
L
Sapete cosa significa esattamente?
$rat = round ($avg_rating/$avg_total,2);
Non capisco il ,2.
Grazie,
L
architxt.net | Io uso Textpattern
rappresenta il numero di cifre significative dopo la virgola.
http://it.php.net/roundcodice:<?php echo round(3.4); // 3 echo round(3.5); // 4 echo round(3.6); // 4 echo round(3.6, 0); // 4 echo round(1.95583, 2); // 1.96 echo round(1241757, -3); // 1242000 echo round(5.045, 2); // 5.04 echo round(5.055, 2); // 5.06 ?>
think simple think ringo
grazie!
architxt.net | Io uso Textpattern