Hey Michael:

On Sun, Aug 17, 2008 at 04:49:02PM -0400, Michael B Allen wrote:
> 
> Is it ok to access non-existent array elements?

It depends on how you define okay. :)  You can do it.  It will work 
reliably, but it produces notices (if you have errors displayed or 
logged).  So, it's a bad practice.


> Will accessing an array element using a key that does not exist always
> return NULL?

Yes.  That's the case with accessing any non-existant variable in PHP.

Enjoy,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to