Analysieren Sie Fehler bei der Verwendung von array_push (), um einem Array assoziative Elemente hinzuzufügen

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Analysieren Sie Fehler bei der Verwendung von array_push (), um einem Array assoziative Elemente hinzuzufügen

by Anonymous » 25 Feb 2025, 18:49

Ich habe Probleme mit Array_Push. Es zeigt "Fehler analysieren: Syntaxfehler, unerwartete t_double_arrow" Die Variable $ vars ist ein assoziatives Array für PayPal.

Code: Select all

array_push(
$vars,
'item_number' . $num => $id,
'item_name' . $num => $cart_item->name,
'amount_' . $num => $cart_item->discount_price,
'quantity_' . $num => $value
);
< /code>
$vars = array (
'cmd' => '_cart',
'charset' => 'utf-8',
'upload' => '1',
'currency_code' => 'HKD',
'amount' => $_SESSION['total'],
'custom' => $user_data->id
);

Top