Re: elementary question about reading an array ...
| From: | John W. Holmes | Date: | Thu, 01 Apr 2004 16:47:59 +0000 |
| Subject: | Re: elementary question about reading an array ... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182037@lists.php.net to get a copy of this message | ||
From: "Kenn Murrah" <kenn@thebytebusiness.com>
> In code that I did not create (and do not entirely understand), an array
> ($db) was created which, if displayed with print_r($db), shows the
> following:
>
> Array ( [0] => bc Object ( [fullname] => Kent Huffman [industry] =>
> Technology Solutions [url] => /tsi [address1] => 2300 W. Plano Parkway
> [city] => Plano [state] => TX [zip] => 75075 [country] => USA [direct]
> => +1 (972) 577 3890 [email] => kent.huffman@ps.net [orderID] => PSC5
> [financialdeptID] => MARCO10 [quantity] => 250 [messagetoprinter] =>
> [shippingmethod] => FedEx Express Saver [ship2name] => Kent Huffman
> [ship2address1] => 2300 W. Plano Parkway [ship2address2] => [ship2city]
> => Plano [ship2state] => TX [ship2zip] => 75075 [ship2country] => USA
> [ship2phone] => +1 (972) 577 3890 ) )
You have an array of objects. Try this:
echo $db[0]->fullname;
---John Holmes...