RE: [PHP] removing an element from an array

2003-10-01 Thread Daniel Perez Clavero
de 2003 13:24 To: [EMAIL PROTECTED] Subject: Re: [PHP] removing an element from an array "Daniel Perez Clavero" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Angelo, > Given array1 extract array2 from there, and put it into $array_result. > > $array2[

RE: [PHP] removing an element from an array

2003-10-01 Thread Daniel Perez Clavero
ray with colors starting with \"B\""; echo ""; echo var_dump($array2_result_diff); ?> -Original Message- From: Angelo Zanetti [mailto:[EMAIL PROTECTED] Sent: miƩrcoles, 01 de octubre de 2003 12:25 To: [EMAIL PROTECTED] Subject: [PHP] removing an element from a

Re: [PHP] removing an element from an array

2003-10-01 Thread Dennis Sterzenbach
"Daniel Perez Clavero" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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

Re: [PHP] removing an element from an array

2003-10-01 Thread Dennis Sterzenbach
"Angelo Zanetti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > isnt the unset function not a safe function to use & was discontinued, i > think thats why its not in the manual. Hi Angelo, look at the examples on http://www.php.net/manual/en/function.unset.php And you know that it

RE: [PHP] removing an element from an array

2003-10-01 Thread Daniel Perez Clavero
2003 12:25 To: [EMAIL PROTECTED] Subject: [PHP] removing an element from an array Hi If I have an array and want to remove and element from this array. correct me if this is the wrong approach: create a temporary array with 1 element less than the origional array, get the position of the el

RE: [PHP] removing an element from an array

2003-10-01 Thread Angelo Zanetti
ject: RE: [PHP] removing an element from an array On 01 October 2003 11:25, Angelo Zanetti contributed these pearls of wisdom: > Hi > > If I have an array and want to remove and element from this > array. correct me if this is the wrong approach: It's the wrong approach ;) &g

RE: [PHP] removing an element from an array

2003-10-01 Thread Ford, Mike [LSS]
On 01 October 2003 11:25, Angelo Zanetti contributed these pearls of wisdom: > Hi > > If I have an array and want to remove and element from this > array. correct me if this is the wrong approach: It's the wrong approach ;) > create a temporary array with 1 element less than the > origional ar

[PHP] removing an element from an array

2003-10-01 Thread Angelo Zanetti
Hi If I have an array and want to remove and element from this array. correct me if this is the wrong approach: create a temporary array with 1 element less than the origional array, get the position of the element ( is there a function for this?) and then run through the origional array copying