title: PHP how to show all decimal places?
body: <p>this might be a stupid question but I have searched again and again without finding any results. </p>
  
  <p>So, what I want is to show all the decimal places of a number without knowing how many decimal places it will have. Take a look at this small code:</p>
  
  <pre><code>$arrayTest = array(0.123456789, 0.0123456789);
  
  foreach($arrayTest as $output){
      $newNumber = $output/1000;
      echo $newNumber;
      echo "&lt;br&gt;";
  }
  </code></pre>
  
  <p>It gives this output: </p>
  
  <pre><code>0.000123456789
  1.23456789E-5
  </code></pre>
  
  <p>Now, I tried using 'number_format', but I don't think that is a good solution. It determines an exact amount of decimal places, and I do not know the amount of decimal places for every number. Take a look at the below code:</p>
  
  <pre><code>$arrayTest = array(0.123456789, 0.0123456789);
  
  foreach($arrayTest as $output){
      $newNumber = $output/1000;
      echo number_format($newNumber,13);
      echo "&lt;br&gt;";
  }
  </code></pre>
  
  <p>It gives this output:</p>
  
  <pre><code>0.0001234567890
  0.0000123456789
  </code></pre>
  
  <p>Now, as you can see there is an excess 0 in the first number, because number_format forces it to have 13 decimal places. </p>
  
  <p>I would really love some guidance on how to get around this problem. Is there a setting in PHP.ini which determines the amount of decimals? 
  Thank you very much in advance!
  (and feel free to ask if you have any further questions)</p>