a1amattyj Posted November 23, 2010 Share Posted November 23, 2010 Hi, Say you had, <business_name type="string">L Choong</business_name>, contained inside a variable(content before and after this in the same var), how would you extract the 'L Choong' information as a new var? Thanks Link to comment https://forums.phpfreaks.com/topic/219613-get-content-preg/ Share on other sites More sharing options...
phoenixx Posted November 23, 2010 Share Posted November 23, 2010 Try $data = ("urlYouAreScraping"); preg_match('/business_name type="string">([^"]*)<\/business_name>/is',$data,$out); // Getting the business name echo $out[1]; Link to comment https://forums.phpfreaks.com/topic/219613-get-content-preg/#findComment-1138594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.