Google Maps Geocoding in PHP

Today’s code is a Google Maps geocoding example with PHP and we also use some Google Maps JavaScript to show the geo-coded data on the map.
You can use this code if you want to create a store locator. Why this is useful? Imagine if you have several addresses on your database, you will never want to manually pin point the latitude and longitude of each of those addresses.
That’s why we have the geocoding method. Just input the addresses and Google will try to identify the approximate location of that address.