[eluser]FireMe[/eluser]
OK, let me lay it out I am using the cart class, for my cart the cart lays out the content in an array like this.
Code:
Array ( [1679091c5a880faf6fb5e6087eb1b2dc] => Array (
[rowid] => 1679091c5a880faf6fb5e6087eb1b2dc
[id] => 6
[qty] => 1
[price] => 19.99
[name] => 25
[product_code] => 00006
[subtotal] => 19.99 )
[6512bd43d9caa6e02c990b0a82652dca] => Array (
[rowid] => 6512bd43d9caa6e02c990b0a82652dca
[id] => 11
[qty] => 1
[price] => 5.99
[name] => 26
[product_code] => 000011
[subtotal] => 5.99 )
)
ok so it outputs like this as
Code:
print_r ($this->cart->contents());
I am using a paypal lib that needs the contents to be output like this
Code:
$this->paypal->add_field( 'item_name', "test");
$this->paypal->add_field( 'amount', '19.99' );
$this->paypal->add_field( 'quantity', '1');
and as I am new to php and codeigniter I am struggling to work out how to work with this multidimensional array?