title: How do I preserve leading and trailing zeros in PHP?
body: <p>I am trying to read a number from a database and write it to an excel file, but I am having trouble keeping leading and trailing zeros. When I checked it, I was able to see that while reading the data, PHP is treating it as a number instead of a string. I have tried type casting and concatenation of the value with an empty string. However, the following code</p>
  
  <pre><code>&lt;?php
      $a = (string) 180961.65000;
      echo $a;
  ?&gt;
  </code></pre>
  
  <p>gets the below output</p>
  
  <blockquote>
    <p>180961.65</p>
  </blockquote>
  
  <p>How would I preserve the zeroes?</p>