ok Posted December 14, 2008 Share Posted December 14, 2008 Hi i want to email the content of an array. It has more than 100 values in it. Can you show me the simple and easy way to do this. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/136889-email-content-of-an-array/ Share on other sites More sharing options...
phpSensei Posted December 14, 2008 Share Posted December 14, 2008 edit: coming up with a code edit: print_r(); not a nice format though, but you can explode the array Quote Link to comment https://forums.phpfreaks.com/topic/136889-email-content-of-an-array/#findComment-714948 Share on other sites More sharing options...
ok Posted December 14, 2008 Author Share Posted December 14, 2008 thanks i know that but i don't like print_r() Quote Link to comment https://forums.phpfreaks.com/topic/136889-email-content-of-an-array/#findComment-714953 Share on other sites More sharing options...
phpSensei Posted December 14, 2008 Share Posted December 14, 2008 <?php $array = array(1,2,3); $array_list = ''; foreach($array as $key => $val){ $array_list .= $val . '<br>'; } $message_body = 'hey this is an email, heres the array <br>' .$array_list; echo $message_body; ?> Quote Link to comment https://forums.phpfreaks.com/topic/136889-email-content-of-an-array/#findComment-714963 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.