初心者の質問
私は次の機能を持っています:
function isadult($description)
{
$bad=/*comma separated bad words*/;
$bad=explode(",",$bad);
foreach($bad as $key)
{
if(eregi($key,$description))
{
return true;
}
}
return false;
}
if (isadult($description)) exit;
else
$descriptionこの関数を変数にも適用したい場合、この関数は変数にのみ適用されます$title。関数を変更するにはどうすればよいですか? でeregiエレギを変更する方法は廃止されましたpreg_matchか?
ありがとう