function follow_build_query in Follow 6
Same name and namespace in other branches
- 5 follow.module \follow_build_query()
- 7.2 follow.inc \follow_build_query()
- 7 follow.module \follow_build_query()
Like drupal_http_build_query() but without urlencodings.
1 call to follow_build_query()
- follow_build_url in ./
follow.module - Build a url for use in the form.
File
- ./
follow.module, line 521 - Allows users to add links to their social network profiles.
Code
function follow_build_query(array $query, $parent = '') {
$params = array();
foreach ($query as $key => $value) {
$key = $parent ? $parent . '[' . $key . ']' : $key;
// Recurse into children.
if (is_array($value)) {
$params[] = follow_build_query($value, $key);
}
elseif (!isset($value)) {
$params[] = $key;
}
else {
$params[] = $key . '=' . $value;
}
}
return implode('&', $params);
}