function to delete chars from a string in php code example
Example: php remove last character in string
//Remove the last character using substr
$string = substr($string, 0, -1);
//Remove the last character using substr
$string = substr($string, 0, -1);