$region_array = array(
1 => 'Region 01',
2 => 'Region 02',
3 => 'Region 03'
);
What I'm trying is
array_slice($region_array, $index); & array_splice($region_array, $index); both does not give me required output.
Required output is
if the pass 2 as the index only 1st two element should be left. if I pass 3 1st three element should be left. How can I do it?
Then whatever the output array is I want to add 0 => 'Select Region' as the 1st option of the output array. I tried
array_push. It adds the element to the end of the array. How can I fix it?