sprintf: Considers the string an integer and formats it as a decimal number : sprintf « Development « PHP






sprintf: Considers the string an integer and formats it as a decimal number


<?

$total = 110;

$fmt_total = sprintf ("%d", $total);

echo "$fmt_total";
?>
           
       








Related examples in the same category

1.Type Specifiers for printf() and sprintf()
2.sprintf %0.2f
3.sprintf: Regards the string an integer and formats it as a binary number
4.sprintf: Considers the string an integer and formats it with that ASCII value