This question is more of a "what is the best/easiest way to do this type of question. I would like to grab just the users id from a string such as <a href="/profile.php?rdc332738&id=123456&refid=22">User name</a>
I would like to parse the string and get just the "123456" part of it.
I was thinking I could explode the string but then i would get id=123456&blahblahblah and i suppose i would have to somehow dynamically remove the trash from the end. I think this may be possible with regex but I'm fairly new to php and so regex is a little above me.
Any help would be great, even if you point me to a similar problem I tried Google and such.