aside from doing the actual work of iterating through an associative array, pushing a value into a new array and setting that equal the array of remaining fields, is there an array function built into PHP that would do something like this?
if so, what is it?
i would be changing the following:
array(
[0] => array(
[created] => 12512512,
[name] => something
)
)
into something like this:
array(
[12512512] => array(
[created] => 12512512,
[name] => something
)
)
Flip the value and remove the old one in the same array… this should be fine provided the created value doesn’t overwrite one of the existing entries, which I highly doubt since
createdseems to be a timestamp.Or you could keep both copies and use references to save on ram.