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:
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
0 comments:
Post a Comment