The typical constructs used for sending stuff to the browser are
echo. The standard way to output the value of a variable is to include it in a doubly quoted string (which will interpolate its value) and then and place it after
echo in a statement.
If you want your output to have a particular format, use
sprintf(). The only difference between
sprintf() is that
printf() sends the resulting string directly to output, whereas
sprintf() returns the result string as its value. I will demonstrate by example and allow you to learn the details from the PHP manual.
$value = 2.688522; printf("%f,%10f,%-010f,%2.2f\n", $value, $value, $value, $value);