I currently have the string: "/en/sports/football/"
How do I substr this string to achieve:
"/sports/football/"
Many thanks for any pointers.
I currently have the string: "/en/sports/football/"
How do I substr this string to achieve:
"/sports/football/"
Many thanks for any pointers.
Well, lets take a look: http://php.net/manual/en/function.substr.php
The method signature looks something like this:
string substr ( string $string , int $start [, int $length ] )
If length is omitted, the substring starting from start until the end of the string will be returned.
So I guess we could do something like this to get characters 3 and onward.
substr("/en/sports/football/", 3);