Data from database show/hide onclick trouble
<pre><code>&lt;?php
$getNews = $db-&gt;prepare("SELECT * FROM news ORDER BY id DESC LIMIT 4");
$getNews-&gt;execute();
$news = $getNews-&gt;fetchAll();
foreach ($news as $newspost) {
    echo $newspost['title'] ; ?&gt; &lt;a style="cursor:pointer;" onclick="return    toggleMe('problem')"&gt;read/hide&lt;/a&gt;
&lt;?php
    echo '&lt;br /&gt;';
    echo 'Posted by '; echo $newspost["user"]; echo ' at '; echo $newspost["created"];  ?&gt;
    &lt;div id="&lt;?php echo $newspost['id']; ?&gt;" style="display:none;"&gt; 
&lt;?php
    echo $newspost['message'];
?&gt;
    &lt;/div&gt;
&lt;?php
    echo '&lt;br /&gt; &lt;br /&gt;';
}
?&gt;
</code></pre>

<p>What I had in mind was that it shows/hides the text from the newspost when you hit the read/hide link next to the title of the newspost.<br>
I can fit the <code>$newspost['id']</code> in the representing div but because the <code>onclick="return toggleMe('problem')"&gt;</code> has both <code>"</code> and <code>'</code> in it I need another way to fit it in there, I searched a lot but couldn't find what I was exactly looking for.</p>
