Place output of while as a string
<p>What would be the best practise in placing the results of a while function into a string.</p>

<p>For example :</p>

<pre><code>while($row2 = mysql_fetch_assoc($select2)){
    echo "id:".$id."&lt;br /&gt;";
    echo "Job Title: ".$title."&lt;br /&gt;";
    echo "Email: ".$email."&lt;br /&gt;";
}

$message = $row2;
</code></pre>

<p>This is what I've tried, but can't find the right way of going about it. Many thanks</p>
