idkwhy Posted November 23, 2012 Share Posted November 23, 2012 I am trying to set up my error handling system and I have all the arrays set like so-- $errormsg[] = 'You need to enter both a username and a password.'; $errormsg[] = 'Incorrect username or password'; etc etc I have print_r($errormsg) somewhere else to display the arrays, but the only thing it outputs is Array ( ). Is there any reasons off the bat it would be empty like that? I realize I have to set $errormsg = array(); which I've done. Originally it was working fine, but I accidentally deleted that line and that's when it started acting up. I added it back but I'm only getting Array ( ) Anyone have any ideas? This is driving me CRAZY. Quote Link to comment https://forums.phpfreaks.com/topic/271087-what-might-cause-an-array-to-display-array-with-no-string-data/ Share on other sites More sharing options...
idkwhy Posted November 23, 2012 Author Share Posted November 23, 2012 Figured out the issue. The $errormsg = array(); was AFTER the $errormsg[]. It needs to be before. Thanks anyways everyone c: Quote Link to comment https://forums.phpfreaks.com/topic/271087-what-might-cause-an-array-to-display-array-with-no-string-data/#findComment-1394677 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.