RE: [PHP] Array question

From: Date: Wed, 16 Aug 2000 17:06:27 +0000
Subject: RE: [PHP] Array question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12061@lists.php.net to get a copy of this message
> -----Original Message----- > From: Paulson, Joseph V. "Jay" [mailto:jay.paulson@viatel.com] > Sent: Wednesday, August 16, 2000 11:29 AM > To: php-general > Subject: [PHP] Array question > > > I have a quick question about declaring an array. Below is the > code snippet that I am dealing with. What happens when i traverse > the $select["options"] position I only get the last two positions > of the $selectOptions array. Obviously, I need it to traverse all > the positions in the $select["options"] array. I don't have a clue > as to why this is only traversing the last two positions (no matter > how many elements are in the array), but any help would be greatly > appreciated! > > $selectOptions = array("label"=>";lkj", > "value"=>"l;kj;", > "label"=>"canada", > "value"=>"Canada", "label"=>"usa", > "value"=>"USA"); (Or, translated out into a longer form) $selectOptions["label"] = ";lkj"; $selectOptions["value"] = "l;kj"; $selectOptions["label"] = "canada"; $selectOptions["value"] = "Canada"; $selectOptions["label"] = "usa"; $selectOptions["value"] = "USA"; Can you see from this what might be causing your problem? --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell

« previous php.general (#12061) next »