note 98335 deleted from control-structures.foreach by googleguy

From: Date: Wed, 14 Nov 2012 22:25:49 +0000
Subject: note 98335 deleted from control-structures.foreach by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191957@lists.php.net to get a copy of this message
Note Submitter: Kris dot Craig at gmail dot com ---- If you're looking for a quick and easy way to recursively pull data from an MD array, here's a little function that should come in handy: <?php /* Grab any values from a multidimensional array using infinite recursion. --Kris */ function RecurseArray( $inarray, $toarray ) { foreach ( $inarray as $inkey => $inval ) { if ( is_array( $inval ) ) { $toarray = $this->RecurseArray( $inval, $toarray ); } else { $toarray[] = $inval; } } return $toarray; } ?>

« previous php.notes (#191957) next »