title: Removing Zeros from decimal place if they are preceding - PHP
body: <p>I am trying to format some values when I retrieve them from the database.</p>
  
  <p>Some of the values look like this -</p>
  
  <pre><code>Values
  121.000
  0.170
  12.500
  12.425
  0.890
  </code></pre>
  
  <p>Here is what I want them to look like - </p>
  
  <pre><code>Values
  121
  .17
  12.5
  12.425
  .89
  </code></pre>
  
  <p>I have searched and searched for a solution but I can only seem to find the answer to one or the other, I need this to work dynamically in one function.</p>
  
  <p>I have tried casting the values to a FloatVal but this doesn't work on 100% of the values.</p>
  
  <p>Please could anyone advise?</p>
  
  <p>Any more info needed please comment.</p>