> why does the error occur only with IE
I'm not convinced that was the case. Having that default value of introduced some potential for inconsistency, then using a function that relies on a particular schema to be present in a string, where even if the input string is correct (not-with-standing spaces), the mechanism can potentially fail. I think that looking for the existence of the string in the other string would probably be a better approach. Though, I don't know the specifics of this project so I can't say for sure. If that is the case, that would be done with strstr() or stristr().
http://www.php.net/strstr and
http://www.php.net/stristr. The latter is case-insensitive.
> I AM using it: before going into the loop, I say $value = trim( $value );
If you're doing it *before* the loop, then you aren't trimming the value. $value is set with each iteration of the foreach loop, so that statement must appear inside of the loop for it to work.
Regards,
Rich
--
[
http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design