Changes

Jump to: navigation, search

Working with Strings and Text in PHP

9 bytes added, 13:18, 4 June 2007
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.

Navigation menu