I use the 'number_format' function of php, to format values in the pattern I want.
I do this:
number_format($valor_form, 2, '.', '');
The problem is that at some point the user informs a very crazy value in the form, and causes an error in the function, because an 'Infinity' string arrives.
My question is about checking if it is a string, and if I have to change the value of the variable 'value_form' to 0.
Can anyone help me?