I am getting Warning: number_format() expects parameter 1 to be double error on my code
$tbl->addRow();
$tbl->addCell($name);
$tbl->addCell('$' . number_format(doubleval($price), 2,',', ' ') );
I know the $price is a value 15,00 which is a number. How could it be fixed?
It’s possible doubleval() is returning some sort of error because the number “15,00” is in european format instead of the standard. Have you tried using “15.00” instead?