I have been on this all day. I will try and explain as best as possible.
I have an array as follows, the problem you will instantly notice there are gaps in the array KEYs. 0-1-2-4-6
I need to re-index the array to 0-1-2-3-4; and so-on.
Array
(
[0] => Array
(
[partcode] => G017G
[prod_name] => Volta 2 Lighting Effect
[prod_title] => Volta 2 Lighting Effect, Black
[prod_tag] => The all new VOLTA 2 sound activated lighting effect with 18 amazing gobos and 10 (+white) rich vibrant colours attac hed to a reflector dish producing a multitude of gobo colour combinations, which can be changed ramdomly or manually using the switches on the rear of the unit. The colours can also be changed remotely using a footswitch (up to 4 units can be controlled via slave option). The unit has adjustable focus, auto sensitivity controls (automatically adjusts the speed to the sound level), rugged build quality, high quality stepper motors, while remaining cool with the aid of a fan.
[trade_price] => 90.0000
[cat_id] => 1641
)
[1] => Array
(
[partcode] => G017F
[prod_name] => Vista 2 Lighting Effect
[prod_title] => Vista 2 Lighting Effect, Black
[prod_tag] => The all new Vista 2 sound activated lighting effect with 18 amazing gobos and 10 (+ white) fixed rich vibrant colours, which can be changed randomly or manually using the switches on the rear of the unit. The colours can also be changed remotely using the switches on the rear of the unit. The colours can also be changed remotely using a footswitch (up to 4 units can be controlled via slave option). The unit has adjustable focus, auto sensitivity controls (automatically adjusts the speed to the sound level), rugged build quality, high quality stepper motors, while remaining cool with the aid of a fan.
[trade_price] => 90.0000
[cat_id] => 1641
)
[2] => Array
(
[partcode] => G009DB
[prod_name] => Vesuvio 2 Flame Light
[prod_title] => Vesuvio 2 Flame Light, Black
[prod_tag] => Large attractive flamelight ideal for hires, corporate events, stage productions etc. The product features a large 1.4m high silk illuminated from beneath by 9 high intensity coloured halogen lamps replicating a moving flame effect and kept aloft by a brushless induction motor designed for continual use allowing this product to be used for long duty periods.
[trade_price] => 197.5000
[cat_id] => 1648
)
[4] => Array
(
[partcode] => G017W
[prod_name] => Venus 2 Lighting Effect
[prod_title] => Venus 2 Lighting Effect, Yellow
[prod_tag] => Mini flower effects with a dazzling array of white beams. The product features a three position switch (sound to light, static, constant rotation), white light, hanging and flooring standing bracket. Made from metal and finished in black.
[trade_price] => 20.1000
[cat_id] => 1641
)
[6] => Array
(
[partcode] => G017L
[prod_name] => Venda Lighting Effect
[prod_title] => Venda Lighting Effect, Black
[prod_tag] => Amazingly effective lighting effect producing a stunning array of vibrant coloured beams that dance to the music. The product features sound activation, speed control, lamps included, massive light output, 50 lenses, adjustable hanging bracket.
[trade_price] => 37.5000
[cat_id] => 1641
)
Is there a pre-defined function that will do this, or does anyone have a pre-written function?
Thanks.