<? function err() { global $err; if (isset($err)) { if (is_array($err)) { foreach ($err as $key=>$value) { echo "<div class='niz'>$value</div>n"; } } else echo "<div class='niz'>$err</div>n"; } } ?>