Example user input
http://domain.com/ http://domain.com/topic/ http://domain.com/topic/cars/ http://www.domain.com/topic/questions/
I want
if its the first characters in the string you can use substr(0,8) , and it will remove the first 8th character if its not use the "str_replace()" function http://php.net/manual/en/function.str-replace.php