Reply to Re: str_ireplace() for php4?

Your name:

Reply:


Posted by Simon on 03/11/06 14:13

> 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);
> }
> }
>
>

Thanks!

Just out of curiosity, would it work if $needle, $str, $haystack had
escape/special characters?

Simon

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация