Forum Moderators: coopster
[1] => Array
(
[name] => Toy Product
[quantity] => 2
[price] => 13.78
[total] => 27.56
)
[2] => Array
(
[name] => Accessory Item
[quantity] => 5
[price] => 6.70
[total] => 33.50
)
[3] => Array
(
[name] => Mini Cooper
[quantity] => 1
[price] => 100.00
[total] => 100.00
)
)
If I remove "Toy Product" (key 1) how can I get "Accessory Item" to be come key 1 and Mini Cooper to become key 2? There must be a function for this somewhere...? Thanks
You can reassign the variable that points to the array with the return value of array_values [php.net].
Andrew
$input = array("red", "green", "blue", "yellow");
array_splice($input, 1, 1);
Array Splice [php.net]
Habtom