Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

How to search with multiple keywords? #43

Open
fleetclean opened this issue Jul 2, 2018 · 2 comments
Open

How to search with multiple keywords? #43

fleetclean opened this issue Jul 2, 2018 · 2 comments

Comments

@fleetclean
Copy link

I see the setKeyword function can only do one keyword at a time. How can I search for multiple keywords?

@anthony-mills
Copy link
Owner

You can just add them seperated by a pipe i.e to search for gym and cinema you could use the following:

$latitude = '-33.8804166';
$longitude = '151.2107662';

$googlePlaces->setLocation($latitude . ',' . $longitude);

$googlePlaces->setRadius(5000);
$googlePlaces->setKeyword('gym|cinema');
$results = $googlePlaces->search();

@fleetclean
Copy link
Author

Thanks for the reply, but this did not seem to work for me. Did not produce any results.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants