The What
Syntax
string sprintf ( string $string_pattern, [, mixed $placeholder_value [, mixed $... ]] );
Description
This PHP function replaces the placeholders in a string with the specified values and returns the formatted string. The placeholders begin with a percent sign (%) and are allowed by the format, e.g. s (for string), d (for integer), and f (for floating point). The function replaces out each placeholder with its associated value, as specified by:
- The specific order identified in the placeholder syntax, e.g.
%2$s
says give me the second$placeholder_value
- Matching the placeholder order with the order of the values.
Parameters
string_pattern
- The string pattern which holds the placeholders to be populated when running this function.
placeholder_value
- optional The first placeholder value.
...
- optional Additional placeholder values, comma-separated.
Return Values
Returns formatted string.
When was the last time you got out of your chair and stretched? Just saying…
More coming soon…keep checking back.