We can remove the last character from the string using
rtrim($string, $charlist)
Ex: Removing the last "/" from the url: http://sahayamatbogex.blogspot.com/
$string = "http://sahayamatbogex.blogspot.com/"
rtrim($string, "/");
For more ref:
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
Remove the last char from the string
Posted by
sahayam
on Saturday, June 11, 2011
/
Labels:
PHP,
Remove last char from the string,
String Function
/
Comments: (0)