Mega Code Archive

 
Categories / Php / Strings
 

Using sprintf with a variable

<?php $total = sprintf("Please pay $%.2f. ", 42.4242 ); echo $total; ?>