Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. $sections = array(
  2. 0 => 'section_one',
  3. 1 => 'section_two',
  4. 2 => 'section_three',
  5. 3 => 'section_four',
  6. 4 => 'section_five',
  7. 5 => 'section_six',
  8. 6 => 'section_seven'
  9. );
  10.  
  11. array(7) { [0]=> string(11) "section_one" [1]=> string(11) "section_two" [2]=> string(13) "section_three" [3]=> string(12) "section_four" [4]=> string(12) "section_five" [5]=> string(11) "section_six" [6]=> string(13) "section_seven" }
  12.  
  13. $arr[ $newkey ] = $arr[ $oldkey ];
  14. unset( $arr[ $oldkey ] );
  15.  
  16. $sections_a = array(
  17. 0 => 'section_one',
  18. 1 => 'section_six',
  19. 2 => 'section_two',
  20. 3 => 'section_three',
  21. 4 => 'section_four',
  22. 5 => 'section_five',
  23. 6 => 'section_six',
  24. 7 => 'section_seven'
  25. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement