Posted By

shanejonas on 12/18/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vehler


Get parameter from an URI string in PHP


 / Published in: PHP
 

  1. // Will echo "value1"
  2. parse_str(parse_url('www.test.com/test.php?param1=value1&param2=value2', PHP_URL_QUERY), $query_data);
  3. echo $query_data['param1'];

Report this snippet  

You need to login to post a comment.