I'm sorry to trouble you, I have tried my best to solve this but I am not sure where I am going wrong and I was wondering if someone out there would be willing to help! 

Basically, I am having some issues with $\_SESSION variables; I would like for each occasion that a visitor came to the page that they would be shown a different content message.. The below code, when first landing on a page will seem to skip the first "content1", and will display "content2" instead, then "content3" after another revisit. I've put in an unset call, which eventually sends it there, am I not using \_SESSIONS correctly? 

I'm not sure how the session variable was assigned to 1, for it to land correctly in the if===1 statement without it first returning the original "content1"

```
if (empty($_SESSION)) {
        session_start();
    }

    if (!isset($_SESSION['content'])) {
        $content = "content1";
        $_SESSION['content'] = 1;
        return $content;
    }
    elseif ($_SESSION['content'] === 1) {
        $content = "content2";
        $_SESSION['content'] = 2;
        return $content;
    }
    elseif($_SESSION['content'] === 2) {
        $content = "content3";
        unset($_SESSION['content']);
        return $content;
    }

```

Apologies for babbling or whether this was a simple fix / misunderstanding on my part. It's caused quite a headache!

Many thanks.

-edit- 

This is a function that is called from within the same class, it has not gone through a loop anywhere either..