This line of code does a database query:
[indent]$address_database_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");[/indent]
Now you want to put all that information into an array so it can be used. This is the code:
[indent]$address_array = tep_db_fetch_array($address_database_query);[/indent]
Now just assign what data field from the array you want to a variable. This is the code:
[indent]$street_address = $address_array['street_address'];[/indent]
Now you will want to display it somewhere. Just echo the new variable containing the data you want. This is the code:
[indent]<?php echo $street_address;?>[/indent]
Thats it. I would have liked to have found this here, rather than spending a couple hours figuring it out... so hence my posting. If it saves someone else an hour or two, then I'll be happy. Hoped it helped.
Peace
Edited by shawn84, 02 September 2010, 13:07.














