I read on different posts that to push data to an array is it better to use myarray []= instead of array_push(). Eventhough I read several posts on the subject I do not see how to convert the here below code to array[] =. Hope someone can help. Thank you in advance for your replies. Cheers. Marc
array_push($myarray, array($street, $code, $country));
myarray[] = ???
Doing :
would do it. Docs on this method are here
The docs for
array_pushrecommend :This means that the internals of array_push are the same as doing the above call – so calling the
array_pushmethod to add one element is a waste !Docs for array_push here