RE: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-15 Thread Boyd, Todd M.
> -Original Message- > From: Simcha Younger [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2008 2:49 AM > To: 'Don'; php-general@lists.php.net > Subject: RE: [PHP] Removing an element from the middle of an mdlti- > dimentsional array > > > a

RE: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-14 Thread Simcha Younger
array_splice($a, 1, 1); This will remove the second element, and reset the keys. Simcha Younger -Original Message- From: Don [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2008 4:30 AM To: php-general@lists.php.net Subject: [PHP] Removing an element from the middle of an mdlti-di

Re: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-14 Thread Don Proshetsky
Yup, thanks. Also execute: $array = array_values(array) in order to fix the indexes - Original Message - From: "mike" <[EMAIL PROTECTED]> To: "Don" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 14, 2008 11:16 PM Subject: Re: [PHP] Removing an elem

Re: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-14 Thread mike
Not on the specific sub element. I.e unset($array[2][0]) On Aug 14, 2008, at 8:08 PM, "Don" <[EMAIL PROTECTED]> wrote: Won't unset() destroy the entire array? "mike" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Can't you unset() it? Sorry for top posting I'm on an iPhone On Au

Re: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-14 Thread Don
Won't unset() destroy the entire array? "mike" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can't you unset() it? Sorry for top posting I'm on an iPhone > > On Aug 14, 2008, at 7:30 PM, "Don" <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Let's say I have the following array: >> >> $m

Re: [PHP] Removing an element from the middle of an mdlti-dimentsional array

2008-08-14 Thread mike
Can't you unset() it? Sorry for top posting I'm on an iPhone On Aug 14, 2008, at 7:30 PM, "Don" <[EMAIL PROTECTED]> wrote: Hi, Let's say I have the following array: $myArray = array(array('1','2','3'), array('4','5','6'), array('7','8','9'), array('10','11','12')); How do I remove say the