I consider myself to be an average PHP coder, but I can barely edit the few bits of JavaScript code that I need on my websites. I have an address in a PHP variable and I would like a simple map to show up on my webpage with that address. I've done some research on the internet and I find a lot op geocoding, converting an address to a location the Google API understands, but I'm completely lost. Is there no simple piece of code to in which I can embed my variables?
You can use an iframe and pass the address as an URL parameter.
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.it/maps?q=<?php echo $yourAddress; ?>&output=embed"></iframe>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With