search for in the  
<vfprintfvsprintf>
Last updated: Thu, 19 May 2005

vprintf

(PHP 4 >= 4.1.0, PHP 5)

vprintf -- Output a formatted string

Description

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.

Returns the length of the outputted string.

See also printf(), sprintf(), vsprintf()



User Contributed Notes
vprintf
WebMaestro (asiby at hotmail dot com)
13-Mar-2005 02:40
<?php
$fruits
= array(1, 'banana',1, 'apples', 3, 'oranges', 2, 'peaches');

vprintf("I have %d %s, %d %s, %d %s and %d %s.", $fruits);
?>

Output:

I have 1 banana, 1 apples, 3 oranges and 2 peaches.

<vfprintfvsprintf>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT