Mecha CMS

Extract current URL data.

URL{::,->}query()

Return the URL query.

2.2.0static
URL::query(void);
URL::query(string $separator = '&');
URL::query(string $separator = '&', array $q = []);
$u_r_l->query(void);
$u_r_l->query(string $separator = '&');
$u_r_l->query(string $separator = '&', array $q = []);

Example:

$A = $url->query;
$B = $url->query();
$C = $url->query('&');
$D = $url->query(';', ['foo', => '#']);

Result:

$A = '?foo=bar&baz=qux';
$B = '?foo=bar&baz=qux';
$C = '?foo=bar&baz=qux';
$D = '?foo=bar;baz=qux';