Easy full-width embedded Google Maps in php
Just an easy full-width embedded Google Maps snippet for my own reference:
<!-- In PHP -->
<iframe
src="
<?php
$search\_terms = rawurlencode("3 Abbey Road, London, GB NW8 9AY");
$src =
"https://www.google.com/maps?q=2880%20" .
$search\_terms .
"&t=&z=15&ie=UTF8&iwloc=&output=embed";
echo $src;
?>"
width="600"
height="500"
style="border:0; width: 100% !important;"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0"
allowfullscreen=""
loading="lazy">
</iframe>
<!-- Or, in raw HTML -->
<iframe
src="https://www.google.com/maps?q=2880%203%20Abbey%20Road%2C%20London%2C%20GB%20NW8%209AY&t=&z=15&ie=UTF8&iwloc=&output=embed"
style="border: 0px none; width: 100% !important; max-width: 100%;"
scrolling="no"
marginheight="0"
marginwidth="0"
allowfullscreen=""
loading="lazy"
width="600"
height="500"
frameborder="0"
>
</iframe>
Should result into: