RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
I'm sorry, I missed a really big problem with what you're doing. When you use foreach(), the value that it gives you (in your case, via the $value variable) is not a reference to the array item, its a copy of it, so modifying the copy doesn't modify your original array. Use this (this should work

RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
a stripped"; } } -Original Message- From: Matt Honeycutt [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 11:56 AM To: php Subject: RE: [PHP] re: strip comma from $value ereg_replace returns a string, regardless of whether or not any replacement occured. If n

RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
ereg_replace returns a string, regardless of whether or not any replacement occured. If no replacement occurs, the original string is returned. Additionally, it does not modify the original string, so you need to store the string it returns: foreach($numeric_array as $key => $value ) { i