public function to_query_string($options = array()) { $temp = array(); foreach ($options as $key => $value) { if (is_string($key) && !is_array($value)) { $temp[] = rawurlencode($key) . '=' . rawurlencode($value); } } return implode('&', $temp); }