If you want to check the number to be integer, you can use this function:
isInt = function(field) {
if (+field != field || field.indexOf(".") != -1) {
return false;
} else {
return true;
}
}
If you want to check the number to be integer, you can use this function:
isInt = function(field) {
if (+field != field || field.indexOf(".") != -1) {
return false;
} else {
return true;
}
}
Very often arises the question, what is the difference between print and echo in PHP? Understanding the difference can help you to use the most applicable construction in each case.