if else

Is this correct?

Page 1 of 1

1 Replies - 1660 Views - Last Post: 08 May 2005 - 02:50 AM Rate Topic: -----

#1 Adsa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 21-April 05

if else

Posted 08 May 2005 - 01:16 AM

I need some more help please just wondering if this statement is correct for an if else stament?

if ($clan_select = $clan_name)  {
         if ($challanger_score > $defender_score) {
        $win = "Win";
}      else    {
        $win = "Loose"; }
}      else {
        if ($challanger_score < $defender_score) {
       $win = "Loose";
}     else  {
       $win = "Win";}
}



Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: if else

#2 Adsa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 21-April 05

Re: if else

Posted 08 May 2005 - 02:50 AM

Umm I have fixed it. Working fine now.

if ((($clan_select == $clan_name) && ($challanger_score > $defender_score)) xor (($clan_select != $clan_name) && ($challenger_score < $defender_score))) {
       $win = "Win";
}     else  {
       $win = "Loss";
}


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1