format a number with two digit after decimal place echo number_format((float)$number, 2, '.', '');