Daniel Convissor wrote:
On Mon, Mar 10, 2008 at 09:28:29AM -0400, Kenneth Downs wrote:
function arraySafe($array,$key,$default='') {
if(isset($array[$key]))
return $array[$key];
else
return $default;
}
Though this does get tripped up by $array[$key] being NULL.
array_key_exists() is more accurate.
--Dan
Good point.
--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com www.andromeda-project.org
631-689-7200 Fax: 631-689-0527
cell: 631-379-0010
_______________________________________________
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