vprintf

(PHP 4 >= 4.1.0, PHP 5, PHP 7)
Output a formatted string
int vprintf ( string $format, array $args )

Display array values as a formatted string according to format (which is described in the documentation for sprintf()).

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

See sprintf() for a description of format.

Returns:

Returns the length of the outputted string.

Examples:
vprintf() : zero-padded integers
<?php
vprintf("%04d-%02d-%02d", explode('-', '1988-8-1')); // 1988-08-01
?>

See also:

printf() -

sprintf() -

vsprintf() -

doc_php
2016-02-24 16:12:41
Comments
Leave a Comment

Please login to continue.