IR receiver code's


I’m just starting out with arduino and I’m messing around with an IR receiver, a remote control, and two LED lights. I’m trying to get one of the lights to go on for a second when I press the “1” (IR HEX code=FD08F7) button and the other one when I press the “2” button (IR HEX code=FD8877). I’m using a library called IRremote.h that I found here:

So far only one of the lights works when press ANY button on the remote (so not only the “1” button, as it supposed to do)

Here’s my code

#include <IRremote.h>

const int RECV_PIN = 3;
int led1 = 8;
int led2 = 9;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    if (results.value = 0xFD08F7) { 
      digitalWrite(led1, HIGH);   
      digitalWrite(led1, LOW);   
    else if (results.value = 0xFD8877) {
      digitalWrite(led2, HIGH);   
      digitalWrite(led2, LOW);   

If somebody could take a look at it and help me, I would really appreciate it

    if (results.value = 0xFD08F7) {

This is an assignment statement (=), not an equality test (==).

That did the trick thanks a lot!