...

View Full Version : Need help with error



rob7676
02-26-2008, 09: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?

Thanks

Fumigator
02-26-2008, 09: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?

rob7676
02-26-2008, 10: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum