Re-indexing array?
Posted: Sat Jan 26, 2008 3:41 pm
I have an array:
$colour[0] = "Red";
$colour[1] = "Green";
$colour[2] = "Purple";
$colour[3] = "Blue";
How can I remove the first item in the array and re-index for that I get:
$colour[0] = "Green";
$colour[1] = "Purple";
$colour[2] = "Blue";
$colour[0] = "Red";
$colour[1] = "Green";
$colour[2] = "Purple";
$colour[3] = "Blue";
How can I remove the first item in the array and re-index for that I get:
$colour[0] = "Green";
$colour[1] = "Purple";
$colour[2] = "Blue";