On Mon, Mar 10, 2008 at 9:28 AM, Kenneth Downs <[EMAIL PROTECTED]> wrote: > > function arraySafe($array,$key,$default='') { > if(isset($array[$key])) > return $array[$key]; > else > return $default; > } >
Yes, very useful pattern. Handy for grabbing input out of $_GET and $_POST arrays. -- Chris Snyder http://chxo.com/ _______________________________________________ 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