http_build_query

Supported Versions: PHP 5, PHP 7, PHP 8
Generate URL-encoded query string
<?php http_build_query(    array|object $data,    string $numeric_prefix = "",    ?string $arg_separator = null,    int $encoding_type = PHP_QUERY_RFC1738): string
<?php             $query = array_merge($query, ['redirect' => static::$redirect]);

        }



        return explode('?', $url)[0].'?'.http_build_query($query);



        return $url;

    }
<?php     public function addToCartUrl($site, $statamic, $addons)

    {

        return 'https://statamic.com/cart/bulk-add?'.http_build_query([

            'site' => $site->key(),

            'statamic' => ! $statamic->valid(),

            'products' => $addons->reject->valid()->map->addon()->map(function ($addon) {

                $product = $addon->marketplaceId();

                if ($edition = $addon->edition()) {

                    $product .= ':'.$edition;

                }



                return $product;

            })->implode(','),

        ]);

    }

}
<?php             unset($queryAssociativeArray[$params[0]]);



            $value = $url.(empty($queryAssociativeArray) ? '' : '?'.http_build_query($queryAssociativeArray)).$anchor;

        }



        return $value;
<?php             $queryAssociativeArray[$params[0]] = $params[1] ?? '';



            $value = "{$url}?".http_build_query($queryAssociativeArray).$anchor;

        }



        return $value;
<?php         $params = array_merge($params, ['site' => $site]);



        return $this->getJson($url.'?'.http_build_query($params));

    }



    private function mockTextFieldtype()