PHP Number Leading Zero’s
<?php $id = 3; echo sprintf(“%04d”,$id); //result 0003 ?>
Read more<?php $id = 3; echo sprintf(“%04d”,$id); //result 0003 ?>
Read moreSELECT EXTRACT(year from AGE(NOW(), ’1985-08-21′)) as “age”;
Read morefunction round_number(n, d) { n = n – 0; if (d == null) d = 2; var f = Math.pow(10, d); n += Math.pow(10, – (d + 1)); n = Math.round(n * f) / f; n += Math.pow(10, – (d + 1)); n += ”; return d == 0 ? n.substring(0, n.indexOf(‘.’)) : n.substring(0, n.indexOf(‘.’) [...]
Read more