International PHP Conference 2015


(PECL pecl_http >= 0.23.0)

http_build_strBuild query string


string http_build_str ( array $query [, string $prefix [, string $arg_separator = ini_get("arg_separator.output") ]] )

Builds a query string from an array of query variables. In effect, this function is the opposite of parse_str().

Elenco dei parametri


associative array of query string parameters


top level prefix


argument separator to use (by default the INI setting arg_separator.output will be used, or "&" if neither is set

Valori restituiti

Returns the built query as string on success o FALSE in caso di fallimento.

Vedere anche:

add a note add a note

User Contributed Notes 1 note

g dot kuizinas at anuary dot com
2 years ago
For those who are using PECL pecl_http 2, you need to refer to HttpQueryString, which is now implemented under http namespace. Therefore,

<?php new \http\QueryString(); ?>
To Top