A Query String is a part of url accessed through web browser. Using query string we passed the argument to web pages. Using this article we will help you to how to fetch values of query string using php script.
Fetch Query String:
We can fetch url Query String values from $_SERVER array like following example.
Advertisement
<?php $qs = $_SERVER['QUERY_STRING ']; ?>
Parse Query String:
Now we can parse the query string and store it to an array using parse_str function.
<?php parse_str($qs, $qs_arr); print_r($qs_arr); ?>