voyde Posted July 20, 2007 Share Posted July 20, 2007 Lets say i have a page, and in that page i have a url a hyperlink if you will. The link inside the page is Http://www.somesite.com/index.php?topic=385 How do i get JUST the number 385? I have tried some splits but end up with the first part but not the part i need. Remember this is inside a page already displayed. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 20, 2007 Share Posted July 20, 2007 Well, this code will do it for that specific URL. I'm not sure if you need it a little more dynamic than this: <?php $url = "Http://www.somesite.com/index.php?topic=385"; $url = explode("=", $url); echo $url[1]; ?> Quote Link to comment Share on other sites More sharing options...
voyde Posted July 20, 2007 Author Share Posted July 20, 2007 Thanks! Solved! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.