View Full Version : Need help with error

02-26-2008, 10:23 PM
I have a search script for searching .pdf files which works great, but I get an

Warning: printf() [function.printf]: Too few arguments in /index.php on line 84
My code for line 84 is:

printf("<tr><td><a href=\"/msds/" . trim($row["productnumber"]) . ".pdf\">" . $row["productnumber"] . "</a></td><td>" . trim($row["productname"]) . "</td></tr>");
Can anyone please help me with this?


02-26-2008, 10:33 PM
My guess is there are percent signs in the values of the variables you are building the string with, which printf() recognizes as a conversion specifier, and expects an additional argument to complete the conversion.

So... why are you using printf() rather than just plain ol' print?

02-26-2008, 11:49 PM
I don't PHP very well so my friend helped me with it. I changed it to print() and error went away thanks for you help.