DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Re-create Array Index

04.10.2012
| 6505 views |
  • submit to reddit
        
$new_array = explode('.sep.', implode('.sep', $old_array));
    

Comments

Snippets Manager replied on Mon, 2012/05/07 - 2:11pm

One more thing: Someone do something about this color scheme! I have to Ctrl+A to read the code :? At least change the variable names to something less turquoise. Pretty please?

Snippets Manager replied on Mon, 2012/05/07 - 2:11pm

Uhm, $new_array = array_values($old_array);?