note 80631 deleted from ref.array by levim

From: Date: Tue, 06 May 2014 21:57:56 +0000
Subject: note 80631 deleted from ref.array by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199432@lists.php.net to get a copy of this message
Note Submitter: really quick function ---- function array_flatten($a){ //flattens multi-dim arrays (distroys keys) $ab = array(); if(!is_array($a)) return $ab; foreach($a as $value){ if(is_array($value)){ $ab = array_merge($ab,array_flatten($value)); }else{ array_push($ab,$value); } } return $ab; }

« previous php.notes (#199432) next »