Ini tidak berfungsi karena kueri Anda akan diperluas ke:
SELECT url FROM `PHP`.`db` WHERE url LIKE '%gum.cn,lol.com.,ns1.blar.com...%'
Anda harus sedikit mengubah kueri Anda:
$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}";