It doesn't work because your query will expand to:
SELECT url FROM `PHP`.`db` WHERE url LIKE '%gum.cn,lol.com.,ns1.blar.com...%'
You have to modify your query a little:
$query_parts = array();
foreach ($array_name as $val) {
$query_parts[] = "'%".mysql_real_escape_string($val)."%'";
}
$string = implode(' OR url LIKE ', $query_parts);
$tank = "SELECT url FROM `PHP`.`db` WHERE url LIKE {$string}";
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…