When using a foreach loop it works with no issues, but I don't know how to implement this inside a function.
The function I'm trying to write.
function fgf($array, $section_k, $section_n) {
foreach($array as &$k_687d) {
$k_687d['section'] = section_k;
$k_687d['section_name'] = $section_n;
$k_687d['section_ssn'] = 'df6s';
}
return $array;
}
The Array Example.
$array = array(
'work'=>array(
'default' => 1,
'opt_type' => 'input',
),
'something_else' => array(
'default' => 1,
'opt_type' => 'list',
),
)
CALL
fgf($array, 'work_stuff', 'Work Stuff');