aebstract Posted October 6, 2008 Share Posted October 6, 2008 I have a file with the following code: <?php $emails = array(email@email.com, email@email.com, email@email.com, email@email.com, email@email.com); echo $emails; ?> This is returning a white page, how come? Quote Link to comment Share on other sites More sharing options...
aebstract Posted October 6, 2008 Author Share Posted October 6, 2008 I put each email inside double quotation marks and now it echos "Array". edit: I guess I need to run a loop to echo out each line from the array.. Quote Link to comment Share on other sites More sharing options...
Orio Posted October 6, 2008 Share Posted October 6, 2008 You can either use print_r($emails) to print the array, or just loop through it and print it's contents. But for debugging and checking print_r() could be very useful: <?php $emails = array("email@email.com", "email@email.com", "email@email.com"); echo "<pre>"; print_r($emails); echo "</pre>"; ?> Orio. 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.