PHP 8.5.0 Alpha 2 available for testing

Voting

: one plus one?
(Example: nine)

The Note You're Voting On

anonymous
13 years ago
Is it worth noting that if query_data is an associative array and a value is itself an empty array, or an array of nothing but empty array (or arrays containing only empty arrays etc.), the corresponding key will not appear in the resulting query string?
E.g.

$post_data = array('name'=>'miller', 'address'=>array('address_lines'=>array()), 'age'=>23);
echo http_build_query($post_data);

will print
name=miller&age=23

<< Back to user notes page

To Top