Exemplo n.º 1
0
 public static function build_query($data)
 {
     $ret = array();
     foreach ((array) $data as $k => $v) {
         $k = urlencode($k);
         if ($v === NULL) {
             continue;
         } elseif ($v === FALSE) {
             $v = '0';
         }
         if (is_array($v) || is_object($v)) {
             array_push($ret, YZE_Request::build_query($v));
         } else {
             array_push($ret, $k . '=' . urlencode($v));
         }
     }
     $sep = ini_get('arg_separator.output');
     return implode($sep, $ret);
 }