Get parameter from an URI string in PHP
Copy this code and paste it in your HTML
// Will echo "value1"
parse_str(parse_url('www.test.com/test.php?param1=value1¶m2=value2', PHP_URL_QUERY
), $query_data); echo $query_data['param1'];
Report this snippet
Comments
Subscribe to comments