function hidden_field_tags($array, $prefix = '') { $html = ''; foreach ($array as $k => $v) { $name = strlen($prefix) ? "{$prefix}[{$k}]" : $k; if (is_enumerable($v)) { $html .= hidden_field_tags($v, $name); } else { $html .= hidden_field_tag($name, $v); } } return $html; }
function _array_url_encode_recurse($src, &$dst, $omit, $prefix) { foreach ($src as $k => $v) { if ($k === $omit) { continue; } $name = strlen($prefix) ? "{$prefix}[{$k}]" : $k; if (is_enumerable($v)) { _array_url_encode_recurse($v, $dst, $omit, $name); } else { $dst[] = urlencode($name) . '=' . urlencode($v); } } }