★ wanayoo — archive 1999 http://fr.php.net/manual/cs/function.vprintf.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<vfprintfvsprintf>
view the version of this page
Last updated: Sun, 20 Mar 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()



add a note add a note User Contributed Notes
vprintf
WebMaestro (asiby at hotmail dot com)
13-Mar-2005 09: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: Sun, 20 Mar 2005
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This mirror generously provided by: nexen.net
Last updated: Mon Mar 21 05:14:01 2005 CET