freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Daniel Fazekas <fdsubs AT axelero.hu>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] Re: Parse Error on the output
- Date: Fri, 23 Apr 2004 19:22:45 +0200
On Apr 23, 2004, at 16:51, rconner AT commspeed.net wrote:
I am trying to put the data recieved from a Query into tables but It seems
to be giving me some trouble. I get a Parse error on the 4th line here.
any suggestions?
while ($arr = mssql_fetch_row($res))
{
print ("<table border=1 cellspacing =0><tr align=center nowrap>");
print ("<td align=left nowrap width=180>%s</td>", $arr["0"]);
print() only takes one argument, note the difference between print and printf:
http://www.php.net/print
http://www.php.net/printf
It seems to be quite useless to go for printf() in such a simple case though.
You could simply type
print "<td align=left nowrap width=180>" . $arr["0"] . "</td>";
You'd do well to wrap the $arr["0"] inside a htmlspecialchars() call so people couldn't inject malicious html code into your page.
I recommend reading the PHP manual:
http://www.php.net/manual/en/index.php
That and consulting PHP forums and mailing lists instead of this FreeTDS list for problems such as this.
--
fds
- [freetds] Re: Parse Error on the output, Daniel Fazekas, 04/23/2004
Archive powered by MHonArc 2.6.24.