function array2str in Search Autocomplete 7.2
Same name and namespace in other branches
- 7.3 search_autocomplete.form.treelist.inc \array2str()
This function transforms the choices into a string.
File
- ./
search_autocomplete.form.treelist.inc, line 102 - Search Autocomplete Display the list of form to autocomplete and themis it as a draggable table.
Code
function array2str($myarray, &$output = '', $parentkey = "---") {
foreach ($myarray as $key => $value) {
if (is_array($value)) {
$parentkey .= "---";
array2str($value, $output, $parentkey);
$parentkey = substr($parentkey, 0, -3);
}
else {
$output .= $parentkey . "[" . $key . "] => " . $value . "<br/>";
}
}
return $output;
}