Thank you so much @frankbeen. I appreciate your help.

Here is the solution:

`function getEvenAndOddNumbers($Arr) {`

`$result = array( 'even' => array(), 'odd' => array());`

`foreach($Arr as $key=>$value) {`

`if($value % 2 === 0) {`

`$result['even'][] = $value;`

`} else {`

`$result['odd'][] = $value;`

`}`

`}`

`return $result;`

`}`

`$numbers = [1,2,3,4,5,6,7,8,9,10,11,12,13,14];`

`$result = getEvenAndOddNumbers($numbers);`

`print_r($result);`

**Output:**

`Array (`

`[even] => Array ( [0] => 2 [1] => 4 [2] => 6 [3] => 8 [4] => 10 [5] => 12 [6] => 14 )`

`[odd] => Array ( [0] => 1 [1] => 3 [2] => 5 [3] => 7 [4] => 9 [5] => 11 [6] => 13 )`

`)`

Now, I would be interested to know, how to get the above output in the following format:

`array (`

`"even" => [2,4,6,8,10,12,14]`

`"odd" => [1,3,5,7,9,11,13]`

`)`