title: Convert number to string in php
body: <p>In the following I tried <code>$code = (string)$code;</code> with no success, how can I convert number to string in PHP?</p>
  
  <pre><code>$code = 087326487326;
  $strlen = strlen($code);
  print $strlen."&lt;br/&gt;";
  for ($i = $strlen; $i &gt;= 0; $i--) {
    print substr($code, 0, $i)."&lt;br/&gt;";
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>1
  0
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$code = '087326487326';
  $strlen = strlen($code);
  print $strlen."&lt;br/&gt;";
  for ($i = $strlen; $i &gt;= 0; $i--) {
    print substr($code, 0, $i)."&lt;br/&gt;";
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>12
  087326487326
  08732648732
  0873264873
  087326487
  08732648
  0873264
  087326
  08732
  0873
  087
  08
  0
  </code></pre>