Jump to content

Recommended Posts

Posted

hi guys i have sample code.

$a = ':59:/12345678'
$a = stringReplace($a, ":59:", "")
$a = stringReplace($a, " ", "")
$a = stringReplace($a, "-", "")
$a = stringReplace($a, "/", "")
if isnumber($a) then
MsgBox(0, "line", $a)
else
MsgBox(0, "error", 'Not a Number')
endif

as you can see the the value of $a before it starts to do the if statement will be "12345678" but then again the msgbox that i am getting is the second one "Not a number". so i came up with the conclusion that $a is still a string, question is how do i do this? (what i mean is how would the script know if its already a number or not?)

Work smarter not harder.My First Posted Script: DataBase

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...