I need to convert numbers to have .00 after them, but only if the number is an integer, or it has just 1 number after the decimal point, like so:
1.4 = 1.40
You can also use printf or sprintf
printf("%01.2f", '34.77'); $formatted_num = sprintf("%01.2f", '34.77');