Mail() iteration problem
| From: | Robert Pruitt | Date: | Wed, 23 Apr 2003 00:33:34 +0000 |
| Subject: | Mail() iteration problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144929@lists.php.net to get a copy of this message | ||
This query works as expected when returned to the browser. When sent to
mail() it craps out on the 16th iteration. It will pick one random
field, and throws an explanation mark in it -- ! -- the next field is no
longer in the table, but has moved to the top of the table, like a
caption. Sometimes the caption will show a <td> sometimes not.
Subsequent fields display properly, but are no longer in the correct
columns -- the missing column which has now become similar to a table
caption is filled in by the next field. Any rows after the 16th appear
to be normal. If I don't return 16 rows, everything is normal.
I don't have a clue. Anybody able to shed some light?
$query = "select * from table";
$result = mysql_db_query("$dbName", $query);
$msg = '';
while ($r = mysql_fetch_array($result)) {
$variable1 = $r["variable1"];
$variable2 = $r["variable2"];
$variable3 = $r["variable3"];
$msg.="<tr><td>$variable1</td><td>$variable2</td><td>$variable3</td></tr>";
}
mail("joecool@example.com", "My Subject", $msg);