jigen7 Posted October 4, 2007 Share Posted October 4, 2007 can anyone help me fix this?? code it gives me an unset error which i dont know how to debug.. it reads every url stored in $all_url then removes the url that has address starting from 0-9 and if it see the word google it is also remove... or can anyone give me an alternative code? $x = $counter; while (++$x < 200) { if (preg_match('~http://(www\.)?([0-9]|(.+\.)?google\.com)~', $all_url[$x]) unset($all_url[$x]); } Quote Link to comment https://forums.phpfreaks.com/topic/71878-helpparse-error-parse-error-unexpected-t_unset-error/ Share on other sites More sharing options...
teng84 Posted October 4, 2007 Share Posted October 4, 2007 add ) at the end of yout if statement Quote Link to comment https://forums.phpfreaks.com/topic/71878-helpparse-error-parse-error-unexpected-t_unset-error/#findComment-362072 Share on other sites More sharing options...
jigen7 Posted October 4, 2007 Author Share Posted October 4, 2007 oh man is that all??well it works lol thx but it does not return the urls that i want Quote Link to comment https://forums.phpfreaks.com/topic/71878-helpparse-error-parse-error-unexpected-t_unset-error/#findComment-362077 Share on other sites More sharing options...
teng84 Posted October 4, 2007 Share Posted October 4, 2007 http://www.php.net/manual/en/function.preg-match-all.php i guess you missed one parameter Quote Link to comment https://forums.phpfreaks.com/topic/71878-helpparse-error-parse-error-unexpected-t_unset-error/#findComment-362078 Share on other sites More sharing options...
jigen7 Posted October 4, 2007 Author Share Posted October 4, 2007 can any1 revise it?i want to get only the urls from the variable $all_url with full domain for example www.digitalpoint.com... i want to exclude the urls that is starting with a number , /search, and site that does not include google word in ot good in regualr expressions lol Quote Link to comment https://forums.phpfreaks.com/topic/71878-helpparse-error-parse-error-unexpected-t_unset-error/#findComment-362087 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.