[PHP] Re: [PHP-WIN] Re: [PHP] Removing Items from an Array

2005-10-13 Thread tg-php
That works just as well, if you have only two levels of depth. Mostly I was trying to illustrate how to use $key => $value in a foreach and what to do if you need to go multiple levels down. Once you get to the bottom level, then you can use isset() certainly. Just wanted to make sure that it

RE: [PHP] Removing Items from an Array

2005-10-12 Thread Alan Lord
m Maas [mailto:[EMAIL PROTECTED] > Sent: 12 October 2005 19:18 > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net; [EMAIL PROTECTED] > Subject: Re: [PHP] Removing Items from an Array > > Id like to continue where TG left off ... > > hth. > > [EMAIL PROTECTED] wrote:

Re: [PHP] Removing Items from an Array

2005-10-12 Thread Jochem Maas
Id like to continue where TG left off ... hth. [EMAIL PROTECTED] wrote: If I understand what you're asking, then maybe this will help: $arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1); $arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5); $alldataarr["Fruits"] = $ar

Re: [PHP] Removing Items from an Array

2005-10-12 Thread tg-php
If I understand what you're asking, then maybe this will help: $arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1); $arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5); $alldataarr["Fruits"] = $arrset1; $alldataarr["Furniture"] = $arrset2; Say we want to remove "Chairs",

Re: [PHP] Removing Items from an Array

2005-10-12 Thread Paul Waring
On Wed, Oct 12, 2005 at 05:24:11PM +0100, Alan Lord wrote: > I'm really struggling here! I have a large, multi-dimensional array that > I want to "clean-up" a bit before committing to a database. How big an array? You could just go create another array of the same structure and copy the values acr