Reputation: 807
I am trying to separate an array from a nested array.Any help would be appreciated.
Nested array:
array:1 [▼
"empid" => array:2 [▼
0 => "IDE023"
1 => "IDE025"
]
]
I want to split the below array from that
array:2 [▼
0 => "IDE023"
1 => "IDE025"
]
How can i do that using PHP ?
Upvotes: 0
Views: 61
Reputation: 9675
Use array_pop
$yourArray = array_pop($yourArray);
Note this will disturb the original array. Use only if don't want to use the original array again.
Upvotes: 1