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