Putting html within a php array
<p>I'm having problems with the syntax for a php array.</p>

<pre><code>&lt;?php
$pages = get_pages(array('child_of' =&gt; $post-&gt;ID, 'sort_column' =&gt; 'menu_order'));
$data = array();
foreach($pages as $post){
  setup_postdata($post);
  $fields = get_fields(); 
  $data[] = '&lt;p&gt;'.$fields-&gt;company_name.'&lt;/p&gt;&lt;img src="'.$fields-&gt;company_logo."' /&gt;';
}
wp_reset_query();

// the js array
echo 'var marker_data = ' . json_encode($data) . ';'; // Instead of implode
?&gt;
</code></pre>

<p>Specifically this line:</p>

<pre><code>$data[] = '&lt;p&gt;'.$fields-&gt;company_name.'&lt;/p&gt;&lt;img src="'.$fields-&gt;company_logo."' /&gt;';
</code></pre>

<p>I'm getting all kinds of errors with adding the img tag, how would I format it correctly?</p>
