$error = ''; function test_liczba($element2) { } if($error !== '') { }
I dla czego to nie działa?
Zmienna $error jest pusta.
$error = ''; function test_liczba($element2) { } if($error !== '') { }
$error = ''; function test_liczba($element2) { return $error; } if($error !== '') { }
{ } else { }
<?php function test($arr) { foreach ($arr as $val) { return false; break; } } return true; } ?>