> is_numeric() Thanks, it works so fine.
> should probably be $dataP3 = $dataParts[2]; The script in the email has some other errors, I wrote that as an example. The original script is OK. Thank you very much. Rafael Soares - AgênciaM Fone: +55 11 4616-1394 -----Mensagem original----- 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 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 = $dataParts[3]; should probably be $dataP3 = $dataParts[2]; Larry -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php