>Just a performance question, if anyone knows for sure.  Within a large 
>array, would using numerical indices be quicker than associative?  I'm 
>talking about a *noticeable* difference in performance, here.

Almost for sure, nope.

Run a test for yourself.

>Also, on Regular Expression replacements:
>$text = eregi_replace("([abc]+)", "<span style=\"color: red\">\\1</span>", $text);
>Would this replace any occurences of the pattern with the same pattern 
>match in red text?  I'm not sure exactly how the \\1, \\2, etc. works.  So, does:

Yes, for those browsers that understand the span tag.
A quick test script in PHP would have been faster than asking... :-)

>$text = eregi_replace("(a)(b)(c)", "\\1", $text);
>Does this output only the 'a'?  I find this confusing for some reason, 
>hehe.  Any help would be great!

Yes.  If you had \\2 and \\3 somewhere, they'd be 'b' and 'c' respectively.
Again a quick test script in PHP would have been faster...

Like Music?  http://l-i-e.com/artists.htm

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to