If I were to create a function that would have a list of errors within it, how would i go about calling them? The basic code would be something like this (it does not work):
function error($error)
{
$error_1 = "Username is not accepted.";
$error_2 = "Password is not valid.";
$error_3 = "Sorry, server is full.";
}
and then when something happens in a certain script, you could just call the function with the error number:: eg. error(1) and it would echo 'Username is not accepted.' How could I do this?