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
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
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
3 matches
Mail list logo