When I declare a variable, for example $a with a value 0, and then in a function I alter that value and re-declare $a I cannot access to that new value outside the function.
$a = 0;
function func(){
for ($i = 0; $i<=10; $i++){
$a += 1;
}
var_dump($a);
echo '<br />';
}
func();
var_dump($a);
For example, at the first var_dump (The one inside the function) the result is 11, and at the 2nd one (outside the function) the value is 0;