How to get comma separated values in td
<p>i getting values from query but i have to place them as comma separated values if there is more than one value
I'm looking for output like this:
     title   (x,y) , (x,y) </p>

<p>Please help me how can i do this i'm trying in function to get this</p>

<pre><code>$cols = array ('test.*', 'user.*', 'count(test_stats.test_public_id) as 
past_day_views','test_stats.test_public_id', 'test_stats.*' );
$select = $db-&gt;select () -&gt;from ( 'test', $cols )
    -&gt;join ( 'user', 'user.user_id = test.user_id', array () )
    -&gt;join ( 'test_stats', 'test_stats.test_public_id = test.test_public_id', array ())
    -&gt;where ( 'test_stats.updated_on &gt; DATE_SUB(CURDATE(), INTERVAL 1 DAY)' )
    -&gt;group ( 'test_stats.test_public_id' )
    -&gt;order ( 'title' );
    $result = $db-&gt;fetchAll ( $select );
foreach ( $result as $row1 ) {
    $x = $row1 ['x'] ;
    $y = $row1 ['y'];
    $z = $row1 ['title'];
}
</code></pre>
