mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 20:52:45 +00:00
Clean up example
This commit is contained in:
+5
-4
@@ -189,10 +189,11 @@ class Curl
|
||||
// Avoid using http_build_query() as keys with null values are
|
||||
// unexpectedly excluded from the resulting string.
|
||||
//
|
||||
// http_build_query(['a' => '1', 'b' => null, 'c' => '3']);
|
||||
// >> "a=1&c=3"
|
||||
// http_build_query(['a' => '1', 'b' => '', 'c' => '3']);
|
||||
// >> "a=1&b=&c=3"
|
||||
// $ php -a
|
||||
// php > echo http_build_query(['a' => '1', 'b' => null, 'c' => '3']);
|
||||
// a=1&c=3
|
||||
// php > echo http_build_query(['a' => '1', 'b' => '', 'c' => '3']);
|
||||
// a=1&b=&c=3
|
||||
//
|
||||
// $data = http_build_query($data, '', '&');
|
||||
$data = implode('&', array_map(function ($k, $v) {
|
||||
|
||||
Reference in New Issue
Block a user