Page 1 of 1

eregi_replace replacement for php 6?

Posted: Tue Nov 10, 2009 7:53 am
by pinehead18
eregi_replace is being removed in php6 what function should i use?

Thanks,

Re: eregi_replace replacement for php 6?

Posted: Tue Nov 10, 2009 8:23 am
by AbraCadaver
If you need regex then preg_replace(). If not then str_ireplace().

-Shawn

Re: eregi_replace replacement for php 6?

Posted: Tue Nov 10, 2009 12:57 pm
by pinehead18
well, not sure what function i should use. I want to search for a string within a variable that starts with &.
Any thoughts?

Re: eregi_replace replacement for php 6?

Posted: Tue Nov 10, 2009 1:00 pm
by AbraCadaver
Do you just want to know if the string exists in the other string? Do you want to replace it? Do you want to find something that you're not sure what it is but know what surrounds it or what pattern it is?

-Shawn