[ create a new paste ] login | about

Link: http://codepad.org/juqrB2sU    [ raw code | output | fork ]

PHP, pasted on Dec 3:
1
2
3
4
5
6
7
8
9
10
$result = array();
$values = array($b, $c, $d);

foreach($a as $index => $key) {
    $t = array();
    foreach($values as $value) {
        $t[] = $value[$index];
    }
    $result[$key]  = $t;
}


Output:
1
2
3
4
5
6
7
8
9
10
$result = array();
$values = array($b, $c, $d);

foreach($a as $index => $key) {
    $t = array();
    foreach($values as $value) {
        $t[] = $value[$index];
    }
    $result[$key]  = $t;
}


Create a new paste based on this one


Comments: