I\'ve been trying to push an item to an associative array like this:
$new_input[\'name\'] = array(
\'type\' => \'text\',
\'label\' => \'First
There is a better way to do this:
If the array $arr_options contains the existing array.
$arr_new_input['name'] = [
'type' => 'text',
'label' => 'First name',
'show' => true,
'required' => true
];
$arr_options += $arr_new_input;
Warning: $arr_options must exist. if $arr_options already has a ['name'] it wil be overwritten.
Hope this helps.