<!DOCTYPE html>
<html>
<body>

<?php
$number = 123;
printf("有两位小数:%1\$.2f<br>没有小数:%1\$u",$number);
?>

</body>
</html>