Jump to content

Recommended Posts

Posted

Ive got a variable like so

$key = 12345678

I need to find if the variable is wrong,so I thought

if not $key = 12345678 then exit

but that doesnt work

Whats the best way to go about this??

regards bluerein

Posted (edited)

if $key <> 12345678

or

if not ($key == 12345678)

Your way, the 'not' attaches to $key first, so your expression becomes (assuming $key is non-zero)

if 0 = 12345678

Edited by wraithdu
Posted

Ive got a variable like so

$key = 12345678

I need to find if the variable is wrong,so I thought

if not $key = 12345678 then exit

but that doesnt work

Whats the best way to go about this??

regards bluerein

Please post in right forum. Here is Example forum.

The answer:

If $key <> 12345678 Then Exit

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...