Little rant here, I see a LOT of this when I look at code.. Lets say you do a query and one of the field names you are getting is username, the query itself is thrown into a recordset called $logged. A ***
LOT*** of code I see these days does this....
echo $logged[username];Do you see the problem? No? <me gets out the ruler and pounds your knuckles>
It's WRONG, it's the WRONG SYNTAX... Just cuz you put error_reporting( E_NOTICES ) and you don't see it doesn't mean its not there!!!! The correct syntax is
echo $logged['username'];A Key/Value array is expecting a key, a key which is a string! If you are referencing it by number then fine you don't need the single quotes. Though using a number makes the code obtuse but thats another peeve all together.
Put the single quotes around your key value, thats the correct way of doing it. Even when you have error reporting skipping notices you are, in fact, still throwing an exception and it's slowing down you code. Doesn't matter if you see it or not, it's going slower.
In fact, IMHO, you should always develop with error_reporting( E_ALL );
If you are not using the single quotes go fix your code now and I mean right now. Those of you that do use the correct syntax well grab a beer on me then
