multidimensional arrays

From: Date: Tue, 14 Nov 2000 08:58:15 +0000
Subject: multidimensional arrays
Groups: php.general 
Request: Send a blank email to php-general+get-25160@lists.php.net to get a copy of this message
Hi, I'm having a bit trouble working with these multidim arrays and the manual doesn't say much. If i have an array like this: $ar["news"]["item1"]="title" ... $ar["news"]["item10"]="title10" I want to do a foreach but on the item1 - item10 keys, but next construction doesn't work: foreach ($ar["news"] as $item) ... Php says $ar["news"] isn't an array, but it is it should be the array {item1 => "title1", item2 => ...} Any help is welcome Bernhard Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such a case, you should destroy this message and kindly notify the sender by reply e-mail.

« previous php.general (#25160) next »