Re: array_map() function modification

From: Date: Sat, 12 Jan 2013 20:10:39 +0000
Subject: Re: array_map() function modification
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-64906@lists.php.net to get a copy of this message
On 12 January 2013 20:06, Galen Wright-Watson <ww.galen@gmail.com> wrote: > > Just to be clear, do you mean the result would be: > array($keys[0] => array($vals0[0], $vals1[0], ...), > $keys[1] => array($vals0[1], $vals1[1], ...), > ...) > > so the i-th item in the result would be an array with the i-th items of > each value array, and the i-th item of the key array as the key? I believe so, yes. That is currently how the following (an example already given by Thomas) would work today: array_combine($keys, array_map(null, $vals0, $vals1, $vals2));

« previous php.internals (#64906) next »