Remove the last char from the string

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:

0 comments:

Post a Comment