ça veut dire quoi et ça sert à quoi
sprintf()
en php??
merci devos réponses
<?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
Vous n'aimez pas le lifting de Facebook ? Le site Mashable propose cinq étapes pour revenir à l'ancienne présentation du réseau social.