Re: php/msql
| From: | Fabien ILLIDE | Date: | Sat, 19 Jan 2002 01:50:06 +0000 |
| Subject: | Re: php/msql | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15980@lists.php.net to get a copy of this message | ||
Mike wrote:
Hi,
I have the following code:
while ($row = mysql_fetch_array($result)) {
echo "<tr><td>".$row[0]."</td>\n";
echo "<td>".$row[1]."</td>\n";
$formatted=sprintf("$%s",$row[2]);
echo "<td>" $formatted " </td></tr><br>";
}
I get an error in the last line where I want to put $formatted into the last
cell of a table
if I // echo $formatted without the HTML tags it puts it at the top of the
page.
The error is : Parse error: parse error, expecting ','' or ';''
also: what does the "\n" mean at the end of the html tags?
I am new to PHP and have no seen that before.
Thanks.
Mike