I have a form that allows the user to reorder a list. So, the order of the array winds up out of sequence. I want to leave the values in the order that they are sent, but I want to rename the keys so that they are in sequential order.
So, my array looks like this:
Array ( [name] => Moi [username] => Someone [plot_2] => 1430 [plot_10] => 1375 [plot_4] => 1453 [plot_1] => 1455 [plot_5] => 1427 [plot_8] => 1434 [plot_9] => 1435 [plot_6] => 1433 [plot] => Submit )
But, I want it to look like this:
Array ( [name] => Moi [username] => [plot_1] => 1430 [plot_2] => 1375 [plot_3] => 1453 [plot_4] => 1455 [plot_5] => 1427 [plot_6] => 1434 [plot_7 => 1435 [plot_8] => 1433 [plot] => Submit )
Unless, there's an easier way to get the values from the plot_x keys in the order that the appear?