Borrar ultimo caracter


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?
  2. $cad = "Hola";
  3. $cad = substr ($cad, 0, -1);
  4. echo $cad ; // esto muestra Hol
  5. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.