Hi, im learning PHP atm and I'm very confused about how increments work and am failing to make sense of this example that was given to me:
e.g.
$a = 2; $b = $a++; // $a=3, $b=2
$a = 2; $b = ++$a; // $a=3, $b=3
So "$b" is simply in other terms "$a+1"?
And "$a" is 2, therefore $b is supposed to be 3 right? But it says its 2 instead?
Could explain how this works pls