Code: Select all
<?php
if ( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count( $_SESSION['ERRMSG_ARR'] ) > 0 ) {
echo '<ul>';
foreach($_SESSION['ERRMSG_ARR'] as $msg) {
echo ' <li> ',$msg,'</li>';
}
echo '</ul>';
unset($_SESSION['ERRMSG_ARR']);
}
?>
[text]
0 ) { echo '
'; foreach($_SESSION['ERRMSG_ARR'] as $msg) { echo '
',$msg,'
'; } echo '
'; unset($_SESSION['ERRMSG_ARR']); } ?>
[/text]
But when I change the IF statement from >0 to != the code disappears
Code: Select all
if ( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count( $_SESSION['ERRMSG_ARR'] ) != 0 ) {