- str_ireplace: documentation ( source)
<?php
function safeEval($haystack,$needle)
{
str_ireplace($needle,"' '",$haystack);
//$return = $haystack;
return eval($haystack);
//return;
}
$string = array("Hello","drop","Kyle");
$find = array("Drop");
safeEval($string.";",$find);