The parse_str function parses a query string into variables.

    
    $queryString = "name=Peter&age=43";

    parse_str($queryString, $parts);

    echo $parts['name'];
    // Peter

    echo $parts['age'];
    // 43