1$colors = array("blue","green","red");
2
3//delete element in array by value "green"
4if (($key = array_search("green", $colors)) !== false) {
5 unset($colors[$key]);
6}
1
2<?php
3$array = array("size" => "XL", "color" => "gold");
4print_r(array_values($array));
5?>
6Array
7(
8 [0] => XL
9 [1] => gold
10)
11