function fp_query_string_encode
Search API
7.x misc.inc | fp_query_string_encode($query, $exclude = array(), $parent = '') |
6.x misc.inc | fp_query_string_encode($query, $exclude = array(), $parent = '') |
Adapted from https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...
2 calls to fp_query_string_encode()
- pager_get_querystring in includes/
theme.inc - Adapted from https://api.drupal.org/api/drupal/includes%21pager.inc/function/pager_ge...
- theme_pager_link in includes/
theme.inc - Adapted from https://api.drupal.org/api/drupal/includes%21pager.inc/function/theme_pa...
File
- includes/
misc.inc, line 3019 - This file contains misc functions for FlightPath
Code
function fp_query_string_encode($query, $exclude = array(), $parent = '') {
$params = array();
foreach ($query as $key => $value) {
$key = rawurlencode($key);
if ($parent) {
$key = $parent . '[' . $key . ']';
}
if (in_array($key, $exclude)) {
continue;
}
if (is_array($value)) {
$params [] = fp_query_string_encode($value, $exclude, $key);
}
else {
$params [] = $key . '=' . rawurlencode($value);
}
}
return implode('&', $params);
}