[freetds] Re: Parse Error on the output
fdsubs at axelero.hu
Fri Apr 23 13:22:45 EDT 2004
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
> to be giving me some trouble. I get a Parse error on the 4th line
> 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
It seems to be quite useless to go for printf() in such a simple case
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:
That and consulting PHP forums and mailing lists instead of this
FreeTDS list for problems such as this.
More information about the FreeTDS