private static function addParams($url, array $params = array())
    {
        $cParams = count($params);

        if ($cParams > 0) {
            $url .= '?';
            $idx = 1;
            foreach ($params as $key => $value) {
                $url .= $key.'='.$value;
                if ($idx < $cParams) {
                    $url .= '&';
                }
                ++$idx;
            }
        }

        return $url;
    }
private static function addParams($url, array $params = array())
    {
        $cParams = count($params);

        if ($cParams > 0) {
            $url .= '?';
            $idx = 1;
            foreach ($params as $key => $value) {
                $url .= $key.'='.$value;
                if ($idx < $cParams) {
                    $url .= '&';
                }
                ++$idx;
            }
        }

        return $url;
    }
private static function addParams ( $ url , array $ params = array ( ) ) { $ cParams = count ( $ params ) ; if ( $ cParams > 0 ) { $ url .= '?' ; $ idx = 1 ; foreach ( $ params as $ key => $ value ) { $ url .= $ key . '=' . $ value ; if ( $ idx < $ cParams ) { $ url .= '&' ; } ++ $ idx ; } } return $ url ; }
Appends GET parameters to url.

@param string $url
@param array  $params Assosiative array in format [key => value ] for GET parameters

@return string
Appends GET parameters to url .