Q1 :If I'm for example is going to replace all occurences of "foo" in the
following sentence with "bar" in case-insensetiv manner how would I do it?
"Foo foo foo Foo fOO fOo" should be replaced with "Bar bar bar Bar bAR
bAr"...
I guess I would need regular expressions? Right?
-----------------
Q2: I belive that there will be no cases with "fOO" or "fOo" only "Foo" or
"foo".
What I'm doing right now is a
str_replace(strtolower("FOO"),uc_first(strtolower("BAR")),$myVar_str);
This works okey most of the time, but the format from Q1 would be prefered.
Would I suffer a great deal of speed trying to fix the above output?
-----------------
Q3: Would it work to do a
str_replace("foo","foobar","foo foo foo foo foo");
-----------------
Q4: Is ther a predefined function for inserting a string into another string
at n characters?
$myVar_str = "My bar string";
str_insert("foo",$myVar_str, 3);
would result in $myVar_str == My foobar string.
I couldn't find this in the manual....
-----------------
.b [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php