Bonsoir à tous,

je souhaite appliquer la fonction sprintf sur un format qui serait du code html.

du genre :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
$format = '<div style="100%;"><span style="width:30%;">tatata %1$d</span></div>';
$retour = sprintf($format,50);
Il va me retourner : Warning: sprintf() [function.sprintf]: Too few arguments in

Alors comment dire à sprintf d'ignorer ces caractères pourcentages ? Là je coince...

Merci d'avance!
Clément