I am having trouble with array_push. It is displaying "Parse error: syntax error, unexpected T_DOUBLE_ARROW" The variable $vars is an associative array for paypal.
array_push(
$vars,
'item_number' . $num => $id,
'item_name' . $num => $cart_item->name,
'amount_' . $num => $cart_item->discount_price,
'quantity_' . $num => $value
);
$vars = array (
'cmd' => '_cart',
'charset' => 'utf-8',
'upload' => '1',
'currency_code' => 'HKD',
'amount' => $_SESSION['total'],
'custom' => $user_data->id
);
$vars? or are you adding the items of the new array to$varsone by one?$varsin your second statement? What should be the sctructure of$vars? Maybe you could give a link to some documentation of the expected format.