Posted by Janwillem Borleffs on 03/11/06 12:17
Simon wrote:
> would anybody have a version of str_irepalce(),
> (http://uk.php.net/manual/en/function.str-ireplace.php) for php4?
>
> The doc mentions eregi_replace() and preg_repalce() but I cannot get
> my head around it.
>
if (!function_exists('str_ireplace')) {
function str_ireplace($needle, $str, $haystack) {
return preg_replace("/$needle/i", $str, $haystack);
}
}
JW
[Back to original message]
|