Arrays and Regs

From: Date: Thu, 18 Jul 2002 19:55:13 +0000
Subject: Arrays and Regs
Groups: php.general 
Request: Send a blank email to php-general+get-108329@lists.php.net to get a copy of this message
Howdy, 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. 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: $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! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/

« previous php.general (#108329) next »