vprintf
Output a formatted string
Description
int vprintf
( string $format
, array $args
)
Operates as printf but accepts an array of
arguments, rather than a variable number of arguments.
Parameters
-
format
-
See sprintf for a description of
format
.
-
args
-
Return Values
Returns the length of the outputted string.
Examples
Example #1 vprintf: zero-padded integers
<?php
vprintf("%04d-%02d-%02d", explode('-', '1988-8-1')); // 1988-08-01
?>