Answers for "how to push an object inside another object with php"

PHP
5

array push object php

$myArray = [];

array_push($myArray, (object)[
        'key1' => 'someValue',
        'key2' => 'someValue2',
        'key3' => 'someValue3',
]);

return $myArray;
Posted by: Guest on March-05-2021

Code answers related to "how to push an object inside another object with php"

Browse Popular Code Answers by Language