Open Mrrkha opened 3 years ago
Make sure to cast your variables before perform any math operations, this error means that you have a format problem.
function presentPrice($price)
{
$price = is_string($price) ? (float)$price : $price;
return 'R$' . number_format($price, 2, ",", ".");
}
Dear, Could you help me ? I got error "A non well formed numeric value encountered".