Re: removing an element from an array

From: Date: Wed, 01 Oct 2003 11:23:52 +0000
Subject: Re: removing an element from an array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-164528@lists.php.net to get a copy of this message
"Daniel Perez Clavero" <daniel.perez@madrid.sema.slb.com> wrote in message news:NDEKIMJLKBNGEIOBDFOJCEGBCEAA.daniel.perez@madrid.sema.slb.com... > Angelo, > Given array1 extract array2 from there, and put it into $array_result. > > $array2[0]="Value to extract"; > $array_result = array_diff ($array1, $array2); > > Should work. > Rgrds. Well this only returns the differences between $array1 and $array2. But it doesn't touch/change the arrays themselves. -- Dennis Sterzenbach www.darknoise.de

« previous php.general (#164528) next »