shage Posted October 3, 2007 Share Posted October 3, 2007 Is there a way to pull out say in a url http://www.yahoo.com/product=tv/index.htm is there any way to pull out "tv" in that, want to be able to echo tv thank you Quote Link to comment https://forums.phpfreaks.com/topic/71663-parse/ Share on other sites More sharing options...
effigy Posted October 3, 2007 Share Posted October 3, 2007 <pre> <?php $str = 'http://www.yahoo.com/product=tv/index.htm'; preg_match('#(?<=product=)[^/]+#', $str, $matches); print_r($matches); ?> </pre> Quote Link to comment https://forums.phpfreaks.com/topic/71663-parse/#findComment-360894 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.