note 99750 deleted from function.array-values by danbrown

From: Date: Fri, 03 Sep 2010 01:02:50 +0000
Subject: note 99750 deleted from function.array-values by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172286@lists.php.net to get a copy of this message
Note Submitter: BWPanda ---- I think the code in #97715 below could be better written as: <?php function array_flatten($a,$f=array()){ if(!$a||!is_array($a))return $f; foreach($a as $k=>$v){ if(is_array($v))$f=array_flatten($v,$f); else $f[$k]=$v; } return $f; } ?> Namely, changing the first return value from '' to $f...

« previous php.notes (#172286) next »