fork(1) download
  1. <?php
  2. $input = array('INPUT_1'=>array(74,69,189,155),'INPUT_2'=>array(45,1,10));
  3. echo "****ENTRADA****".PHP_EOL;
  4. print_r($input);
  5.  
  6. $out = array();
  7.  
  8. foreach($input as $key => $in){
  9. for($i = 0; $i < sizeof($in); $i++){
  10. $out[$key][$i] = $in[$i];
  11. }
  12. }
  13. echo "****SAÍDA****".PHP_EOL;
  14. print_r($out);
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
****ENTRADA****
Array
(
    [INPUT_1] => Array
        (
            [0] => 74
            [1] => 69
            [2] => 189
            [3] => 155
        )

    [INPUT_2] => Array
        (
            [0] => 45
            [1] => 1
            [2] => 10
        )

)
****SAÍDA****
Array
(
    [INPUT_1] => Array
        (
            [0] => 74
            [1] => 69
            [2] => 189
            [3] => 155
        )

    [INPUT_2] => Array
        (
            [0] => 45
            [1] => 1
            [2] => 10
        )

)