Parse string into various variables, setting the variables in the current scope in PHP

Description

The following code shows how to parse string into various variables, setting the variables in the current scope.

Example


<?/*w  w  w .  j  a v  a  2 s  .c  o m*/
$url = "fname=wj&lname=gore&zip=43210";
echo parse_str($url);
echo parse_str("http://www.java2s.com?ln=name&zip=43210");
?>




















Home »
  PHP Tutorial »
    Form »




PHP Form
Form Demo