multiple if statements

hi im looking for the comand which says if some condition is true and some other condition is true than do something. thanks. :slight_smile:

if(a == b && c == d)
{
   // do something because condition 1 AND condition 2 are both true
}

thanks

See more about it here: && - Arduino Reference

You can also write it:

if(a == b) {
  if ( c == d) {
   // do something because condition 1 AND condition 2 are both true
  }
}

which can potentially give you more flexibility in case you need an "else" clause.