* Thus wrote Richard Cook ([EMAIL PROTECTED]): > Hi All, > Im having a headache trying to sort this out... > > If the customer inputs the value 0 into quantity the array looks like this: > > $array[0][0] = 222222 > $array[0][1] = 0 > > > The question is who can i filter the array removing any values that have 0 > in [x][1], i would also need to re-order the array from 0 to 'n'.
foreach ($array as $i =>$item) { if ( $item[1]) { $new_array[] = $item; } } $array = $new_array; There might be an elegant way with one of the functions in http://php.net/array Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php