I have a list of events displayed in a div using php . These events are fetched from the database. But I need to display the events that are near the entered city.So I used the Google distance javascript api to find the distance between the entered city and city of each event. But Iam not able to load the needed events because the evenmts is in php and distance is in javascript .Can anyone help me to fetch the events that are near the entered city?
The main problem is that I have an array of events in php. To display the events nearest to the city, I have to calculate the distance in javascript and check if it is below some value and if yes,display it and then move to the next element in the array.So Can anyone help me?