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 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> Link to comment https://forums.phpfreaks.com/topic/71663-parse/#findComment-360894 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.