I'm working with OScommerce a lot and There are a lot of statements like this:
<?php echo $order->info['payment_method']; ?>
Can someone clarify what this is doing, I believe it is accessing the data from the 'payment_method' field in the "order" table of the database?
If so, not sure how to interpret a similar statement.
<?php echo $order->customer['telephone']; ?>
Thanks for any assistance.
PLease clarify statement
Moderator: General Moderators
This has nothing to do with accessing data in a database:
$order is an object:
$order->
and customer is a property of that object:
$order->customer
Customer happens to be an associative array, hence you have
$order->customer['payment_method']
If in doubt or question use the great manual to read up on objects and associative arrays.
$order is an object:
$order->
and customer is a property of that object:
$order->customer
Customer happens to be an associative array, hence you have
$order->customer['payment_method']
If in doubt or question use the great manual to read up on objects and associative arrays.