http_build_query
(PHP 5)http_build_query -- Generate URL-encoded query string
- Generates a URL-encoded query string from the associative (or indexed) array provided. formdata may be an array or object containing properties. A formdata array may be a simple one-dimensional structure, or an array of arrays (who in turn may contain other arrays). If numeric indices are used in the base array and a numeric_prefix is provided, it will be prepended to the numeric index for elements in the base array only. This is to allow for legal variable names when the data is decoded by PHP or another CGI application later on.
Замечание: arg_separator.output is used to separate arguments.
Пример 2. http_build_query() with numerically index elements.
|
Пример 3. http_build_query() with complex arrays
- this will output : (word wrapped for readability)
|
Пример 4. Using http_build_query() with an object
|
- See also: parse_str(), parse_url(), urlencode(), and array_walk()
get_meta_tags
parse_url 22222