The sprintf in PHP differs from the printf function usage, sprintfprintf below is an example: rounding retains two digits after the decimal point explanation under the meaning of%0.2f:% means the starting character 0 means that the vacancy with 0 fill 2 means that the decimal point must account for two bits F Represents the conversion of a floating-point number to a character =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-% a percent sign, not converted. b integer turns into binary. The c integer is converted to the corresponding ASCII character. D integers are turned into 10. The F-Times precision number is converted to floating point numbers. o integers are turned into octal. The s integer is converted into a string. The x integer is converted to lowercase 16 rounding. X integers are converted to uppercase 16 rounding. The difference between printf and sprintf 1. printf function: int printf (string format [, mixed args [,
1. About PHP fprintf () functions 10 articles recommended
Introduction: PHP sprintf and printf function usage difference, sprintfprintf below is an example: Rounding reserved decimal point two explanation under the meaning of%0.2f:% means the starting character 0 means that the vacancy with 0 fill 2 means that the decimal point must be two bits F Represents the conversion of a floating-point number to a character =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-% a percent sign, not converted. The b integer is converted into binary. c integers into corresponding ...
2. sprintf in PHP differs from printf function usage, sprintfprintf_php tutorial
Introduction: PHP sprintf and printf function usage difference, sprintfprintf. sprintf in PHP differs from the printf function usage, sprintfprintf below is an example: rounding preserves two decimal places? php$num1 = 21;echo sprintf ("%0.2f", $num 1). " BR/"; Output 21
3. In-depth analysis of the use and difference of sprintf and printf functions in PHP, sprintfprintf_php tutorial
Introduction: In-depth analysis of PHP sprintf and printf function usage and difference, sprintfprintf. In-depth analysis of the use and differences between sprintf and printf functions in PHP, sprintfprintf the PHP sprintf () function to replace the percent sign (%) symbol with a variable passed as a parameter: Php$num
4. sprintf in PHP differs from printf function usage, sprintfprintf
Introduction: PHP sprintf and printf function usage difference, sprintfprintf. sprintf in PHP differs from the printf function usage, sprintfprintf below is an example: rounding preserves two decimal places? php$num1 = 21;echo sprintf ("%0.2f", $num 1). " BR/"; Output 21
5. In-depth analysis of PHP sprintf and printf function usage and differences, sprintfprintf
Introduction: In-depth analysis of PHP sprintf and printf function usage and difference, sprintfprintf. In-depth analysis of the use and differences between sprintf and printf functions in PHP, sprintfprintf the PHP sprintf () function to replace the percent sign (%) symbol with a variable passed as a parameter: Php$num
6. PHP text operation method Set comparison _php
Introduction: Fgets and Fputs, Fread and Fwrite, fscanf and fprintf
7. PHP Text Operation method Set comparison _php tips
Introduction: Fgets and Fputs, Fread and Fwrite, fscanf and fprintf
"Related question and answer recommendation":
Linux-Is there an I/O function that directly reads and writes to the hard disk without caching (memory)?
Linux-How does the printf () function print out a character array?