list() with unknown number of values

From: Date: Mon, 30 Jun 2003 20:40:08 +0000
Subject: list() with unknown number of values
Groups: php.general 
Request: Send a blank email to php-general+get-153478@lists.php.net to get a copy of this message
I want to write a function that manipulates each piece of data in an array (except for the first). Right now I'm using list as follows from this array: $cdata = array( array("Apr-03",12747.17,23486.55,319062.24,257828.73,0.00), array("Sep-02",12379.46,10246.92,482295.71,618131.35,14.99) ); foreach($cdata as $key=>$value) { list($month, $a, $b, $c, $d, $e) = $value; } I'd like to not have to change any of my code for an undertermined number of $a, $b, etc., etc. How do I do this?

« previous php.general (#153478) next »