Reputation Activity
-
jalal got a reaction from pbb76 in Reading associative arrays?Hi
This will do what you want:
echo $new_invoice[0]['LineItems']['LineItem'][0]['Description']; For adding new line items I would go with something like this:
$new_invoice[0]['LineItems']['LineItem'][] = array( 'Description' => 'Sales - Beer Glass', 'Quantity' => '10.00', 'UnitAmount' => '22.00', 'AccountCode' => '400'); Although I will note the naming of your arrays is a little off...
HTH, jalal