Name
http_build_query
Synopsis
string http_build_query(mixedvalues
[, stringprefix
[, stringarg_separator
[, intenc_type
]]] )
Returns a URL-encoded query string from
values
. The array values can be either a
numerically indexed or an associative array (or a combined). Because
strictly numeric names may be illegal in some languages interpreting
the query string on the other side (PHP, for example), if you use
numeric indices in values, you should also provide
prefix
. The value of
prefix
is prepended to all numeric names in
the resulting query string. The
arg_separator
allows for assigning a
customized delimiter and the enc_type
option allows for selecting different encoding types.
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.