Write a string produced according to the formatting string format to the stream resource specified by handle..
The format string is composed of zero or more directives: ordinary characters (excluding %) that are copied directly to the result, and conversion specifications, each of which results in fetching its own parameter. This applies to fprintf(), sprintf(), and printf().
Each conversion specification consists of a percent sign (%), followed by one or more of these elements, in order:
A type specifier that says what type the argument data should be treated as. Possible types:
| % - a literal percent character. No argument is required. |
| b - the argument is treated as an integer, and presented as a binary number. |
| c - the argument is treated as an integer, and presented as the character with that ASCII value. |
| d - the argument is treated as an integer, and presented as a (signed) decimal number. |
| u - the argument is treated as an integer, and presented as an unsigned decimal number. |
| f - the argument is treated as a float, and presented as a floating-point number. |
| o - the argument is treated as an integer, and presented as an octal number. |
| s - the argument is treated as and presented as a string. |
| x - the argument is treated as an integer and presented as a hexadecimal number (with lowercase letters). |
| X - the argument is treated as an integer and presented as a hexadecimal number (with uppercase letters). |
See also: printf(), sprintf(), sscanf(), fscanf(), vsprintf(), and number_format().
<?php
$isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);
?>| This HTML Help has been published using the chm2web software. |