Skip to content

Instantly share code, notes, and snippets.

@jseverson
Created December 3, 2011 01:01
Show Gist options
  • Save jseverson/1425582 to your computer and use it in GitHub Desktop.
Save jseverson/1425582 to your computer and use it in GitHub Desktop.
$page = $this->get('request')->query->get('page');
if (!$page && $queryString = $this->get('request')->server->get('QUERY_STRING')) {
if (preg_match("/page=(\d+)/",$queryString,$matches)) {
$page = $matches[1];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment