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. 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 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() 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; ?> 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
Archived
This topic is now archived and is closed to further replies.