remove last letter php
snippet in php

php remove last character in string

user2948

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

remove last letter php

user7059

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

php remove last character from string

user8841

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