交出Session变量

got a question. I have 3 session variables:

$_SESSION['div1'] = 5
$_SESSION['div2'] = 10
$_SESSION['div3'] = 18

Now i want to hand over the value from $_SESSION['div2'] to $_SESSION['div1']

So i write:

$_SESSION['div1'] = $_SESSION['div2'];

So if i output $_SESSION['div1'] it works and it shows: 10.

But then i want to hand over the value from $_SESSION['div3'] to $_SESSION['div2'].

I write:

$_SESSION['div2'] = $_SESSION['div3'];

But then every variable got the value from $_SESSION['div3']. So if i output everything i get:

$_SESSION['div1'] = 18
$_SESSION['div2'] = 18
$_SESSION['div3'] = 18

Why is this so? Is this because of the session and it don't works chronologically?

I tried it with unset():

$_SESSION['div1'] = $_SESSION['div2'];
unset($_SESSION['div2']);
$_SESSION['div2'] = $_SESSION['div3'];

But it still don't worked.

Anyone an idea how to do this?

Thank you!