Mega Code Archive

 
Categories / Php / Strings
 

Storing a Formatted String

<?php $dosh = sprintf("%.2f", 2.334454); print "$dosh dollars"; ?>