Explication de...(php)
Résolu
maxime_B
Messages postés
822
Statut
Membre
-
jisisv Messages postés 3678 Statut Modérateur -
jisisv Messages postés 3678 Statut Modérateur -
bonjour
ça veut dire quoi et ça sert à quoi
en php??
merci devos réponses
ça veut dire quoi et ça sert à quoi
sprintf()
en php??
merci devos réponses
A voir également:
- Explication de...(php)
- Easy php - Télécharger - Divers Web & Internet
- Foyer netflix explication - Accueil - Guide streaming
- Expert php pinterest - Télécharger - Langages
- Paris multiple 2/6 explication - Forum Loisirs / Divertissements
- Chambre 1408 explication fin ✓ - Forum Cinéma / Télé
1 réponse
Al même chose qu'en C ;)
http://php.easynet.be/manual/fr/function.sprintf.php
exemples
Johan
http://php.easynet.be/manual/fr/function.sprintf.php
exemples
<?php
$st1 = "Hello World";
$pi = 3.1415;
$st = sprintf("The string is %s\n", $st1);
print $st;
$st = sprintf("The string is %25s\n", $st1);
print $st;
$st = sprintf("The string is %'b25s\n", $st1);
print $st;
$st = sprintf("The float is %.7f\n", $pi);
print $st;
$st = sprintf("The float is %10.4f\n", $pi);
print $st;
$st = sprintf("The float is %08f", $pi);
print $st;
?>
johand@horus:~/src/php$ php sprintf.php
The string is Hello World
The string is Hello World
The string is bbbbbbbbbbbbbbHello World
The float is 3.1415000
The float is 3.1415
The float is 3.141500
Johan