how to remove last two characters in a word in php code example
Example 1: remove last letter php
<?php
echo substr('abcdef',0, -1); // abcde
?>
Example 2: php remove last character from string
$hell = substr('hello', 0, -1);
<?php
echo substr('abcdef',0, -1); // abcde
?>
$hell = substr('hello', 0, -1);