Return a formatted string

# vsprintf

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

vsprintf — Return a formatted string

### Descrierea

vsprintf ( string `$format` , array `$args` ) : string

Operates as sprintf() but accepts an array of arguments, rather than a variable number of arguments.

### Parametri

`format`

  See sprintf() for a description of `format`.

`args`

### Valorile întoarse

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

### Exemple

Example #1 vsprintf(): zero-padded integers

`<?php
print vsprintf("%04d-%02d-%02d", explode('-', '1988-8-1')); // 1988-08-01
?>`

### A se vedea și

- sprintf() - Return a formatted string
- vprintf() - Output a formatted string