I have edited my original question because I think made it more complicated than what I need.
Here is what I need to add:
- Check if the input for $query has the word hockey in it
- if not append hockey to the string
- return $query
Here is the portion of the php code that I need to adjust:
public function search($query, $size = 10, $page = 0, $location = '', $miles = 5, $sort = 'rd') {
$params = array(
'q' => rawurlencode(trim($query)),
'sb' => $sort,
'ws' => $size,
'pn' => (intval($page) < 1 ? 0 : intval($page)),
);