Ciffy Posted January 25, 2016 Share Posted January 25, 2016 foreach($text as $key => $value) { echo "test"; echo "value: " . $value . "<br />"; $tab=explode("\t", trim($value)); echo "<br />" . $tab[0] . $tab[$i1] . $tab[$i2] . $tab[$i3] . $tab[$i4] . $tab[$i5]. "<br />"; ... So this snippet is driving me mad. I'm trying to clean up some code that I've been working on in order to move on to the next segment. When I comment out the "echo value . $value" line, the whole thing 500's on me. I added in the echo test statement just to see if there was something weird going on with the open brace in the foreach statement. Does anyone have any idea why this would be acting this way. More code available upon request, but literally all I'm doing in between saves is adding a // in front of the word echo (I've tried at the very front of the line as well as directly in front of the e in echo with the same results). Thanks. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted January 25, 2016 Share Posted January 25, 2016 Are you developing on a live server? Don't do that. Use a local development environment, make PHP display errors and turn error reporting all the way up. Then you'll actually see what's going on instead of just getting a 500 error. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted January 25, 2016 Share Posted January 25, 2016 You're trying to echo an array var which is giving you an error - but since you haven't turned on error checking you can't see it. Do as Jacques1 said. Quote Link to comment 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.