Re: Comparing string to array
| From: | Stut | Date: | Tue, 19 Jun 2007 16:40:06 +0000 |
| Subject: | Re: Comparing string to array | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257431@lists.php.net to get a copy of this message | ||
Jim Lucas wrote:
Richard Davey wrote:I'm not sure who's output you are referring to, but while you're making sense as a comment to a competely different question, it's not relevant to this question. -Stut -- http://stut.net/Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote:in this case, it isn't a valid char. Look at his output, you will see that the single quotes are being included in the actual value of the submitted array. So, in this case, they will mess with his comparison. you'll be comparing "'bob'" not "bob" Look at the output a little closer...DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTEHate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array key. Cheers, Rich