Forum Moderators: coopster
I have a string (usually a url as it happens) which I need to get a certain part of and then store it in a variable.
i.e.
my strings are like this: "http://www.foo.com/directory/add/00102020/do.php?stuff"
"http://www.foo.com/directory/add/00301090/do.php?stuff"
So basically the URL or String are the same except for the numbers change. It is the numbers I want to store in a new variable.
I think I need to use regular expressions and preg_replace but just can't get my head around how!
Any help would be much appreciated.
Thanks
Brett