Stuffing code into variable
| From: | Albert Padley | Date: | Sun, 04 Feb 2007 03:09:26 +0000 |
| Subject: | Stuffing code into variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-248267@lists.php.net to get a copy of this message | ||
It's late and I've been at this a long time today so I throw myself on the mercy of the list.
I have an echo statement that I use in conjunction with a MySQL query.
echo "<tr>\n<td class=\"tabletext\">" . $row['time'] . "</td>\n<td class=\"tabletext\">" . $row['field'] . "</td>\n<td class=\"tabletext\">" . $row['division'] . "</td>\n";
This works perfectly fine. However, I will be using the same code numerous times on the page and wanted to stuff it all into a variable. At this point I can't remember the proper syntax and quoting to get this right. Any takers?
Thanks.
Al Padley