No big deal, mate. Here, let's take a look at the PHP printf() manual page. If you don't know how to reach it, go to http://www.google.com/, type "php", click on "I'm feeling lucky", and in the resulting page type "printf" in the search box (hint: top right) - complex, but not science rocket. Anyway, looking at the printf manual page, we notice it says

void printf ( string format [, mixed args])

Produces output according to format, which is described in the documentation for sprintf().

Hummm, not much to go on. BUT, upon closer inspection, we may notice a reference to this other function: sprintf. The PHP team is a bunch of nice guys, and they even spare us the effort of typing "sprintf" in the search box: they provide us with a direct link in the very text of the page! Should you miss that, they even provide a duplicate in the "See also" section. Try clicking on either - they take you to the same place, and, behold, the answer to your question is indeed there.

If you had the patience to go through this e-mail (took you MUCH longer to read this than actually do it yourself), then you should also take the time to read this piece: http://www.tuxedo.org/~esr/faqs/smart-questions.html - it'll save you time and ridicule in the future. If you're too busy to go through the whole piece, I would recommend this chapter in particular: http://www.tuxedo.org/~esr/faqs/smart-questions.html#rtfm

Regards,
Bogdan

William Martell wrote:
----- Original Message ----- From: "William Martell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
Sent: Friday, December 13, 2002 2:13 PM
Subject: printf %d



Hello All.

Can anyone tell me what this '%d' refers to?

A pointer would be great.  Thanks

[snip]
if (!$result)
die ("Query Failed\n");
else
printf ("Number of rows returned: %d\n<br><br>",
<-------------------------HERE '%d'
mysql_num_rows ($result));
while ($query_data = mysql_fetch_array ($result))
{

 echo "Part#: ".$query_data[holman_part]."<br>";
 echo "Description: ".$query_data[part_desc]."<br><br><br>";
}
[/snip]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to