title: PHP remove last zero from integer by substr
body: <p>in php i get some values from database as integer, now i want to remove last zero from <code>20000000</code> integer, but me below code doesnt work.</p>
  
  <pre><code>$payerd_amount = 20000000;
  $payerd_amount = substr((string)$payerd_amount,1,strlen((string)$payerd_amount) -1);
  </code></pre>
  
  <p>how to do this action? my code seems correct but after substring i get this result:</p>
  
  <pre><code>000
  </code></pre>