array_splice()

From: Date: Fri, 20 Aug 1999 12:01:30 +0000
Subject: array_splice()
Groups: php.general 
Request: Send a blank email to php-general+get-113312@lists.php.net to get a copy of this message
Hi evey1, in order to remove a whole array of values from a multidimensional array I tried the following:
foreach($bkmks as $val) {                                                        if($val[8]==$cod){
                                           array_splice($bkmks,$val,1);
                                                       }
                                      }    It works fine for all the arrays but the first ($bkmks[0]).... When I try to remove that array this is what I get :
Fatal error: Maximum execution time of 30 seconds exceeded in ..... .... after that if I read $bkmks all the arrays have been removed but $bkmks[0](the array I wanted to remove) Why ? Is there a better way to do it ? thanks again

« previous php.general (#113312) next »