format of number on downloading in csv format
<p>Following code returns hours for given seconds, which is working.</p>

<pre><code>&lt;?php

$hrs = seconds_to_dezi(278280);
echo $hrs;
$filename = "test";
header("Content-type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=$filename.xls");

function seconds_to_dezi($s) {
    $n = false;
    if ($s &lt; 0) {
        $n = true;
        $s = -$s;
    }
    $h = round($s / 3600,2);
    $h = number_format($h,2, ',', ' ');
    $h = str_replace(".",",",$h);


    if ($n == true) {
        return ("-" . $h);
    } else {
        return ($h);
    }
}

?&gt;
</code></pre>

<p>Actual output in excel:- 77,3 </p>

<p>Expected output is:- 77,30</p>

<p>i.e on downloading values in csv format, the trailing zero after decimal is truncated. I want to have that zero in excel.</p>
