RE: [PHP] Re: How do I remove an array element from within a recursive function?

2009-02-27 Thread Boyd, Todd M.
-Original Message- From: Chris [mailto:dmag...@gmail.com] Sent: Thursday, February 26, 2009 8:48 PM To: Daevid Vincent Cc: php-general@lists.php.net; Shawn McKenzie Subject: Re: [PHP] Re: How do I remove an array element from within a recursive function? Daevid Vincent wrote: I

Re: [PHP] Re: How do I remove an array element from within a recursive function? [solved]

2009-02-27 Thread Daevid Vincent
)) unset($menuItems[$key]); } -Original Message- From: Chris dmag...@gmail.com To: Daevid Vincent dae...@daevid.com Cc: php-general@lists.php.net, Shawn McKenzie nos...@mckenzies.net Subject: Re: [PHP] Re: How do I remove an array element from within

Re: [PHP] Re: How do I remove an array element from within a recursive function?

2009-02-26 Thread Daevid Vincent
-general@lists.php.net Subject: [PHP] Re: How do I remove an array element from within a recursive function? Date: Thu, 26 Feb 2009 20:10:20 -0600 Daevid Vincent wrote: I'm trying to remove [menu] == 'Login' from the array, but despite finding the element, it never removes. isn't that what

Re: [PHP] Re: How do I remove an array element from within a recursive function?

2009-02-26 Thread Chris
Daevid Vincent wrote: I tried that and it still doesn't work. I even tried this hardcore test: public static final function removeMenuItems($menuItems, $removeArray) { foreach($menuItems as $value) { unset($value); } } You don't unset the value, you unset the key. ?php