Home Insert php and html into div in php variable
Reply: 0

Insert php and html into div in php variable

user616
1#
user616 Published in June 25, 2018, 7:59 am

I have a php variable as such:

$output_map[$the_ID]['map'] = '<div class="marker" data-lat="'.$get_google_map['lat'].'"></div>';

I want the code below inside the "marker" div that's within the above var:

<p><?php echo $location['address']; ?></p>
<p><?php the_field('description'); ?></p>

The <<<EOD method isn't working and going in/out of php tags doesn't seem to work. It seems like it's going to look messy, I wondering what is the syntax I'm missing here?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.420081 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO