php array delete item by its value
while (($i = array_search($value, $array)) !== false) { unset($array[$i]); }