form_options_flatten
- Versions
- 4.7 – 7
form_options_flatten($array, $reset = TRUE)
Code
includes/form.inc, line 1373
<?php
function form_options_flatten($array, $reset = TRUE) {
static $return;
if ($reset) {
$return = array();
}
foreach ($array as $key => $value) {
if (is_object($value)) {
form_options_flatten($value->option, FALSE);
}
else if (is_array($value)) {
form_options_flatten($value, FALSE);
}
else {
$return[$key] = 1;
}
}
return $return;
}
?>Login or register to post comments 