Skip to content

Uri: getQuery Example

Terry L edited this page Jun 20, 2020 · 3 revisions

Shieldon\Psr7\Uri

getQuery

Retrieve the query string of the URI.

  • return string

Example:

$uri = new \Shieldon\Psr7\Uri(
    'https://example.com/post/?p=113&foo=bar#yes-i-do'
);

echo $uri->getQuery();
// Outputs: p=113&foo=bar
Clone this wiki locally