5
Galera use the following code in php
to check that the number is integer:
$qtd_bo = "1.20";
if (!preg_match('/^[1-9][0-9]*$/', $qtd_bo)) {
echo "Não é inteiro";
}
It returns to me that the number 1.20 is not integer. Until then ok.
The problem is that if I put 1.00 he tells me that it is not whole.
I need to check if there is any value after the "."
Validate string in number with php
– rray