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] => [EMAIL PROTECTED] [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 ) )
My elementary question is: how do I reference one item in the array? For instance, if I want
$fullname = "Kent Huffman"
how can I write that statement? I thought $fullname = $db[0]['fullname' would work. It obviously doesn't, and I've tried a dozen other things, including RTFM and several other tutorials, to no avail.
Can someone help?
Thanks.
p.s. and since I've exposed my ignorance on this subject, can anyone point moint me to a good tutorial on the subject of arrays? I've tried to find one that would help, I swear I did, but while I'm beginning to understand the assignment of values to an array, the reading of them (as in this example) still baffles me ... thanks again for the help.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php