Skip to content

Instantly share code, notes, and snippets.

@collinalexbell
Last active January 29, 2016 19:20
Show Gist options
  • Save collinalexbell/ae6e60c0c7af5028e051 to your computer and use it in GitHub Desktop.
Save collinalexbell/ae6e60c0c7af5028e051 to your computer and use it in GitHub Desktop.
// Walk pairs of params adding search parameters
if (!empty($this->_params) && count($this->_params) % 2 == 0) {
for ($i = 0; $i < count($this->_params); $i += 2) {
switch ($this->_params[$i]) {
case 'city':
$city = $this->_params[$i + 1];
break;
case 'keywords':
$keywords = $this->_params[$i + 1];
break;
case 'state':
$state = $this->_params[$i + 1];
break;
default:
$a = 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment