Combining several comments into one string
<p>How could I combine all of the comments that appear in <code>$row["comment"]</code> below into one giant string variable called <code>$commentstring</code>?</p>

<pre><code>$sqlStr = "SELECT comment.comment, comment.datecommented, comment.commentid, comment.points, login.username
FROM comment
LEFT JOIN login ON comment.loginid=login.loginid
WHERE submissionid=$submissionid
ORDER BY comment.points DESC 
LIMIT 100";         

$tzFrom1 = new DateTimeZone('America/New_York'); 
$tzTo1 = new DateTimeZone('America/Phoenix'); 


$result = mysql_query($sqlStr);

$arr = array(); 
echo "&lt;table class=\"commentecho\"&gt;";
$count = 1;
while ($row = mysql_fetch_array($result)) { 
    $dt1 = new DateTime($row["datecommented"], $tzFrom1);  
    $dt1-&gt;setTimezone($tzTo1);
    echo '&lt;tr&gt;';

    echo '&lt;td style="border-left:3px solid #DE2A00; background-color: #DE2A00; border-top:3px solid #DE2A00;" class="commentname2user"&gt;&lt;a href="http://www.domain.com/directory/'.$row["username"].'"&gt;'.$row["username"].'&lt;/a&gt;&lt;/td&gt;';
    echo '&lt;td style="border-bottom:3px solid #DE2A00; border-top:3px solid #DE2A00; border-right:3px solid #DE2A00;" rowspan="4" class="commentname1" id="comment-' . $row["commentid"] . '"&gt;'.stripslashes($row["comment"]).'&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    echo '&lt;tr&gt;';
    echo '&lt;td style="border-left:3px solid #DE2A00; background-color: #DE2A00;" class="commentname2"&gt;'.$dt1-&gt;format('F j, Y').'&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    echo '&lt;tr style="border-left:3px solid #DE2A00; background-color: #DE2A00; border-bottom:0px solid #DE2A00;"&gt;';
    echo '&lt;td style="border-left:3px solid #DE2A00;" class="commentname2"&gt;&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    echo '&lt;tr&gt;';
    echo '&lt;td style="border-left:3px solid #DE2A00; background-color: #DE2A00; border-bottom:3px solid #DE2A00;" class="commentname2user"&gt;&lt;span class=""&gt;&lt;a href="http://www.domain.com/directory/comments/commentpoints.php?submission='.urlencode($submission).'&amp;submissionid='.$submissionid.'&amp;link='.$link.'&amp;submittor='.$submittor.'&amp;submissiondate='.$submissiondate.'&amp;dispurl='.$dispurl.'&amp;subcheck='.$subcheck.'&amp;points='.$points.'&amp;city='.$city.'&amp;commentpoints='.number_format($row["points"]).'&amp;commenter='.$row["username"].'"&gt;'.number_format($row["points"]).'&lt;/a&gt;&lt;span&gt;&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    echo '&lt;tr&gt;';
    echo '&lt;td style="border-bottom:0px solid #DE2A00; border-right:0px solid #DE2A00;" class="commentname2a"&gt;&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    }
echo "&lt;/table&gt;";
</code></pre>
