Answers for "remove first and last character from string in php"

PHP
27

php remove last char from string

//Remove the last character using substr
$string = substr($string, 0, -1);
Posted by: Guest on April-02-2020
6

php pop off the first character of string

$str = substr($str, 1);
Posted by: Guest on September-10-2020

Code answers related to "remove first and last character from string in php"

Browse Popular Code Answers by Language