my system: win 7 32bit, wampserver 2.1e please help me find out the solution of following confusion.
<?php
echo number_format(10,2); //output 10.00
$datetime1 = date_create('2012-12-13');
$datetime2 = date_create('2012-12-14');
$interval = date_diff($datetime1, $datetime2);
echo $interval->format('%d'); //output 1
echo number_format(10,2); // output :.00
echo number_format(10,2); //output 10.00
?>
the first number_format() after dateinterval->format get a wrong result. does number_format conflicts with dateinterval format?