while statements output to variables
| From: | adam | Date: | Thu, 24 May 2001 01:10:54 +0000 |
| Subject: | while statements output to variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54138@lists.php.net to get a copy of this message | ||
i need to write a while statement to a variable that will later be echoed
again on another page after including this file to it. i need to repeat a
statement over and over in it and i do not know how.
<?php
$variable = '<table>
<tr>
<td>' .
do {
'<font>data to be outputted</font>'
}while ($something = mysql_fetch_array($query));
.'</td>
</tr>
</table>';
?>
any help?