Move element from one array to another [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have this array: $arr1 = array( '76' => '1sdf', '43' => 'sdf2', '34' => 'sdf2', '54' => 'sdfsdf2', '53' => '2ssdf', '62' => 'sfds' ); What I want to do is take the first 3 elements, remove them and create a new array with them. So you would have this: $arr1 = array( '54' => 'sdfsdf2', '53' => '2ssdf', '62' =>