PHP Velho Oeste 2024

http_build_str

(PECL pecl_http >= 0.23.0)

http_build_strConstruir un string de consulta

Descripción

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

Construye un string de consulta desde un array de variables de consulta. Prácticamente, esta función es la opuesta de parse_str().

Parámetros

query

Array asociativo de parámetros del string de consulta

prefix

Prefijo de nivel superior

arg_separator

Separador de argumentos (por omisión, se usará el de la directiva INI arg_separator.output, o "&" si no se hubiera establecido).

Valores devueltos

Devuelve la consulta generada en forma de string o FALSE en caso de error.

Ver también

add a note add a note

User Contributed Notes 1 note

up
-1
g dot kuizinas at anuary dot com
11 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