php remove last character from string
snippet in php

php remove last character in string

user5673

//Remove the last character using substr
$string = substr($string, 0, -1);

remove last letter php

user2527

<?php
echo substr('abcdef',0, -1);     // abcde
?>

php remove last character from string

user6392

$hell = substr('hello', 0, -1);