Reputation: 41
$dizi = array(
"tr" => "Turkey",
"uk" => "United Kingdom",
"us" => "United States"
);
i want to add "br"=>"brasil"
to end of the array.
thanks.
Upvotes: 1
Views: 485
Reputation: 145492
A syntax construct that's a bit closer to array_push
would be:
$dizi += array("br" => "Brasil");
Note the +=
But for a single addition you should prefer the direct array assignment (as pointed out in the other answers).
Upvotes: 1