Hi Mike

> 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.

Welcome to our little band!
"Tuxedo Junction" does that mean that there is a dress code on the Internet in Canada?

The echo command outputs one or more strings: 
If you have more than one string, they must be separated with commas.

Alternatively you could join the three strings together using the concatenation 

The "\n" question (newline character) is answered/illustrated in the first link above 
(and many other places -
try throwing it into the manual's search facility).

You sound as if you're just starting out. There are many PHP/MySQL tutorials on the 
web. Start at the host sites
and check out links, otherwise chuck a few of the key words at Google.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to