Improve isNumber
This commit is contained in:
parent
dcd0683b6f
commit
37b043afb5
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ function cmpDate ($p_date,$p_date_oth) {
|
|||
*/
|
||||
function isNumber($p_int) {
|
||||
if ( strlen (trim($p_int)) == 0 ) return 0;
|
||||
if (! ereg ("^[0-9]+$",$p_int) ) {
|
||||
if (! ereg ("^-{0,1}[0-9]+.{0,1}[0-9]*$",$p_int) ) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue