note 58963 added to function.array

From: Date: Tue, 22 Nov 2005 14:13:31 +0000
Subject: note 58963 added to function.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-98927@lists.php.net to get a copy of this message
The following diagram is what I got as an output. However, I want to have an output, "VS100045", how would you do? any clue??? Array ( [cart] => Cart Object ( [items] => Array ( [VS100045] => Array ( [quantity] => 1 [category_id] => ) ) [total] => 12.95 [discount] => 0 ) [shipping_methods] => ) foreach ($this->items as $product_id) { // echo array_keys($this->items); // echo $this->items[trim($product_id)]; // echo $this->items["product_id"]; -> gives me nothing~!!! // echo $this->items[$product_id]; -> gives me an error~!!! // echo $this->trim(items[$product_id]); -> gives me an error~!!! if(!in_array($product_id, $no_shipping_fee_items)) { echo.... } } I've tried many things around, but no clue.... ---- Manual Page -- http://www.php.net/manual/en/function.array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58963 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58963&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58963&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98927) next »