ke
- Original Message -
From: "Rafael Soares" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 17, 2004 10:36 AM
Subject: [PHP-WIN] How to check if a *string* has only numbers...
Hello people!!!
I would like to check if a string contains o
---
De: Larry E. Ullman [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 16 de novembro de 2004 23:42
Para: Rafael Soares
Cc: [EMAIL PROTECTED]
Assunto: Re: [PHP-WIN] How to check if a *string* has only numbers...
> I would like to check if a string contains only numbers, I really cant
>
I would like to check if a string contains only numbers, I really can’t
realize how to do it.
is_numeric()
$data = $_POST[‘data’]; // something like 123.456.789
$dataParts = explode($data);
//these are the variable I have to check:
$dataP1 = $dataParts[0];
$dataP2 = $dataParts[1];
$dataP3 = $dataPa
Hello people!!!
I would like to check if a string contains only numbers, I really cant
realize how to do it.
I tried is_int(), but it dont work because the variable is a string (I used
gettype() to check it) and is_int() returns NULL
It is to validate some data in a form. The variabl