note 80525 deleted from control-structures.while by tularis
| From: | tularis@php.net | Date: | Sun, 20 Jan 2008 23:32:44 +0000 |
| Subject: | note 80525 deleted from control-structures.while by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135271@lists.php.net to get a copy of this message | ||
Note Submitter: Hamed
Reason: useless
----
Using while without echo in while
<?php
while ( $row = mysql_fetch_array($result) ){
$id = $row['id'];
$name = $row['name'];
$rows .= "<tr><td>$name</td></tr>"; // the dot (.) is nessery
before =
}
?>
<table>
<?php echo $rows; ?>
</table>
This is good when you use templates system.