PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

vprintf> <ucwords
Last updated: Fri, 03 Oct 2008

view this page in

vfprintf

(PHP 5)

vfprintfÉcrit une chaîne formatée dans un flux

Description

int vfprintf ( resource $handle , string $format , array $args )

Écrit une chaîne produite en accord avec le paramètre format dans le flux handle .

Agit de la même façon que fprintf() excepté que vfprintf() accepte un tableau d'arguments, plutôt qu'un nombre variant d'arguments.

Liste de paramètres

handle

format

Voir la documentation de la fonction sprintf() pour une description complète du paramètre format .

args

Valeurs de retour

Retourne la longueur de la chaîne retournée.

Exemples

Exemple #1 vfprintf() : zéro comme caractères d'espacements

<?php
if (!($fp fopen('date.txt''w')))
    return;

vfprintf($fp"%04d-%02d-%02d", array($year$month$day));
// écrira la date formatée ISO dans date.txt
?>



add a note add a note User Contributed Notes
vfprintf
There are no user contributed notes for this page.

vprintf> <ucwords
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites