RE: [PHP] Why is this happening

From: Date: Tue, 17 Apr 2001 20:55:38 +0000
Subject: RE: [PHP] Why is this happening
Groups: php.general 
Request: Send a blank email to php-general+get-49048@lists.php.net to get a copy of this message
Ok, I found out what the problem was. I'm still curious why the problem is occuring. > if( $tmpArray[errorNumber] & $typesToDisplay ) { // line to comment out I almost always access associative arrays like the above - almost never without the quotes. IE $there = 5; echo "$this[that]<br>\n"; echo "$joe[bob]<br>\n"; echo "$here[$there]<br>\n"; etc. And so when I tried to access that element in $tmpArray, I did so w/o using the double quotes. As soon as I added the double quotes, however ($tmpArray["errorNumber"]) the problem corrected itself. The arrays iterated through as they should have (and did when the line was commented out). Why would using the double quotes in this situation have fixed the problem with the infinite loop? Chris

« previous php.general (#49048) next »