"php to check if a url contains a query string" Answer’s

0

For any URL as a string:

if (parse_url($url, PHP_URL_QUERY))

http://php.net/parse_url

If it's for the URL of the current request, simply:

if ($_GET)
Wednesday, March 31, 2021
 
keyBeatz
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :