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. Link to comment https://forums.phpfreaks.com/topic/60908-solved-split-help/ 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]; ?> Link to comment https://forums.phpfreaks.com/topic/60908-solved-split-help/#findComment-303094 Share on other sites More sharing options...
voyde Posted July 20, 2007 Author Share Posted July 20, 2007 Thanks! Solved! Link to comment https://forums.phpfreaks.com/topic/60908-solved-split-help/#findComment-303098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.