Re: array_map() function modification
| From: | Thomas Hruska | Date: | Sat, 12 Jan 2013 20:38:17 +0000 |
| Subject: | Re: array_map() function modification | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64910@lists.php.net to get a copy of this message | ||
On 1/12/2013 1:10 PM, Peter Cowburn wrote:
On 12 January 2013 20:06, Galen Wright-Watson <ww.galen@gmail.com> wrote:That was indeed the intent. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you might find useful. http://cubiclesoft.com/Just to be clear, do you mean the result would be: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));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?