Write a PHP script to format values in currency style.
Sample values : value1 = 65.45, value2 = 104.35
<?php $value1 = 65.45; $value2 = 104.35; echo sprintf("%1.2f", $value1+$value2)."\n"; ?>
Sample Output:
169.80
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer