#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    im having some problems with a block of code and could do with some help. i am doing a simple nested if statment following the lines of:

    if($Temp->[$Number][2]>=@Place[2]){
    do stuff
    }

    however i need to have another method of entering the "do stuff" section. the elseif command would work but as it's a nested if statement it would be very untidy. I was thinking of using the or logical operator but cannot get it to work. Can anyone tell me what im doing wrong or if what i am trying to do cannot be done at all?

    the way im currently using the or operator is:

    if($Temp->[$Number][2]>=@Place[2]| |@Place[2]==10){
    do stuff
    }

    on another issue.. is their another way of achieveing the same result as the if statement shown above but more compact?

    thanks in advance
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    10
    Rep Power
    0
    I think it should work if you use "| |" (no space between them) or you could use "or".

IMN logo majestic logo threadwatch logo seochat tools logo