|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
vprintf (PHP 4 >= 4.1.0, PHP 5) vprintf -- Output a formatted string Descriptionint 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 NotesWebMaestro (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.
|