Page 1 of 1 1
Topic Options
#163785 - 2006-06-28 03:40 PM Help with IF statement
GSUK Offline
Starting to like KiXtart

Registered: 2004-03-10
Posts: 125
Hi there,

I have two variables:
x=1
y=5

I need an IF statement to work between the two variables. IE:

If a = (1,2,3,4 or 5)
blah blah blah
Endif

How would I approach this?

Thanks

Top
#163786 - 2006-06-28 03:43 PM Re: Help with IF statement
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
if $a < 6

but how is $x or $y involved there ?
_________________________



Top
#163787 - 2006-06-28 03:45 PM Re: Help with IF statement
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Do you mean:
Code:
$a=3
$x=1
$y=5
If $a>=$x AND $a<=$y "Yes" Else "No" EndIf


Top
#163788 - 2006-06-28 03:53 PM Re: Help with IF statement
GSUK Offline
Starting to like KiXtart

Registered: 2004-03-10
Posts: 125
Yep! That'll do it.

Thanks v. much

Top
#163789 - 2006-06-28 03:54 PM Re: Help with IF statement
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
LOL!!!

best thread. Ever!



[edit: allright, as a german I got difficulties to understand the keywords "work between" at the first read]


Edited by Jochen (2006-06-28 03:56 PM)
_________________________



Top
#163790 - 2006-06-28 09:04 PM Re: Help with IF statement
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
best thread?
how come?
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 641 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.056 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org