if($err)
$_SESSION['msg']['login-err'] = implode('<br />',$err);
Three quick questions:
- Why use a two-dimensional array here? Why not just say
$_SESSION['login-err']
? - How do session variables work? I've looked around and all I can seem to gather is that you can assign variables that are stored in the session, but are there any predefined variables?
- In PHP can you have two dimensional and one dimensional arrays interchangeably? I'm used to needing a new variable if you want a different dimension of array.