PDA

View Full Version : Parse query string


SeeIT Solutions
05-13-2005, 03:58 AM
What is the best way to parse a query string?

I am currently using this:


parse_str($_SERVER['QUERY_STRING'],$vars);
$id = $vars['id'];

firepages
05-13-2005, 03:15 PM
a better question is why ?

PHP automatically parses the query string , e.g $_GET['id'] is automatically available.