build a variable with all HTML
Posted: Sun Dec 02, 2007 4:38 pm
I'm looping through a data set, just like any other time, however instead of writing out the results on the page such as
I want to put all of what would be written out into one single variable... I could create a page that writes everything out, then just use that page to do a file_get_contents and grab html, but I'm not sure if thats the best way....
Any thoughts?
Thanks!
Code: Select all
while($row = mysql_fetch_array($query)){
echo "<div>";
echo $row['name'];
echo "</div>";
}Any thoughts?
Thanks!