title: number_format multiple vars at once in php
body: <p>I have the following script</p>
  
  <pre><code>$a = 434343434343;
  $b = $a *3;
  $c = $a * 6;
  
  print $a;
  print $b;
  print $c;
  </code></pre>
  
  <p>I want all three variables to be returned using the <code>number_format($var)</code> syntax. The three vars are being printed in various parts of an html template. What is the best way to do this for all three vars at once? Should I add these vars to an array and number_format the array?</p>
  
  <p>The best that I can come up with is the following:</p>
  
  <pre><code>$a = 434343434343;
  $b = $a *3;
  $c = $a * 6;
  
  $a = number_format($a);
  $b = number_format($b);
  $c = number_format($c);
  print $a;
  print $b;
  print $c;
  </code></pre>
  
  <p>Is that preferred?</p>