This question is concerning the final state of variable $message_to_user
Consider the following simplified function:
function myArrayFunction()
{
$message_to_user = array();
$message_to_user[] = array('A Success Message', true);
$message_to_user[] = array('An Error Message', false);
echo $message_to_user;
return $message_to_user;
}
Notice that I echo
the array before returning it for troubleshooting and always get Array
as the output.
Question
Why isn't the array getting appended with this syntax?
Thank you in advance for your time.