Text Processing

PHP String Function: Text Processing

sprintf()

sprintf(string $format, mixed ...$values): string

Returns a string produced according to the formatting string format.

vsprintf()

vsprintf(string $format, array $values): string

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

vsprintf("%04d-%02d-%02d", explode('-', '1988-8-1'));