0)) {
foreach ($_SESSION['alert'] as $alert) {
switch ($alert[0]) {
case 'success':
$prefix = 'Suksess –';
break;
case 'info':
$prefix = 'Info –';
break;
case 'warning':
$prefix = 'Varsel –';
break;
case 'danger':
$prefix = 'Error –';
break;
default:
$alert[0] = 'danger';
$prefix = 'Ukjent –';
break;
}
echo('
'.$prefix.' '.$alert[1].'
');
}
$_SESSION['alert'] = [];
}
?>