i have trouble in codeigneter when using assignment operators (+=). Please help me.
Here my code in view:
<?php
$t = 220;
$x += $t;
echo $x;
?>
i get the result but in my view there have a error mesage.
A PHP Error was encountered:
Severity: Notice Message: Undefined variable: x
+=operator is shorthand.$x += $tis shorthand for$x = $x + $t. As you can see,$xisn't defined, so you can't use it in the equation.@$x += $t;. Encourage you not to do so.