Skip to content

Instantly share code, notes, and snippets.

@amussey amussey/convert.php
Created Dec 30, 2013

Embed
What would you like to do?
<?php
$new_array = array();
for ($i = 0; $i < intval(count($old_array)/2); $i++) {
$new_array[$old_array[2*$i]] = $old_array[2*$i+1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.