Press "Enter" to skip to content

phpprintf

PHP printf function

PHP printf() allowing you to define the format of data that will be sent to the browser
 

Example for PHP printf function

<?php
$amt1 = 7.55;
$amt2 = 9.55;
$total = $amt1 + $amt2;
printf(‘The total cost is $%.2f’, $total);
?>