Why I can't insert an associative array inside another array? How can I do that? [PHP]
I try get somenthing like this:
[0] => ['name' => 'namedperson' , 'type' => 'text' ,'id'=>'ahushaus29293' ]
[1] => [...]
...
Example:
public function getArrayWithCustomFields($boardId, $client){
$customFields = $client->getBoardCustomFields($boardId);
foreach($customFields as $customField){
array_push($array_custom_fields, array('name' => $customField->name, 'type' => $customField->type, 'id' => $customField->id));
}
return $array_custom_fields;
}
$customFields
is an array of objects.