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
Check out PHP's built-in function number_format
You can pass it a variable and it'll format it to the correct decimal places
$number = 20; if (is_int($number)) { $number = number_format($number, 2, '.', ''); }