Or:
PHP Code:
stock bool:xValidNumber(const xStr[])
{
new const xNumbers[][] =
{
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
}
new xLen = strlen(xStr)
new i, a, xValids
for(i = 0; i < xLen; i++)
{
for(a = 0; a < sizeof(xNumbers); a++)
{
if(xStr[i] == xNumbers[a][0])
{
xValids ++
break
}
}
}
if (xValids != xLen)
return false
return true
}