title: substr with strlen
body: <p>I have an amount like <strong>0003000</strong>, the last 2 digits are the decimal number. I want to transform  <strong>0003000</strong> to <strong>00030,00</strong> (insert a decimal comma in front of the last 2 digits). 
  I tried to do this with substring. I take the length of the string with strlen and then I make -2, but it ignores the -2.</p>
  
  <p>Here is an example, why is it being ignored?</p>
  
  <pre><code>substr($this-&gt;arrCheck['amountsum'],0,(strlen($this-&gt;arrCheck['amountsum']-2)))
  </code></pre>