34,333
edits
Changes
→Printing Formatting Strings in PHP
Essentially printf allows you to specify a string and define how particular variables are to be embedded in that string. ''fprintf()'' takes two or more arguments and takes the the following form:
<tt>fprintf ( "String containing embedded formatting rules", variable1, variable2, ..., +/-, 'padding char', +/-, width, precision, type );</tt>
PHP will scan the string for the formatting specifiers or rules and substitute that rule for the corresponding variable.