shadiadiph Posted January 23, 2009 Share Posted January 23, 2009 How can i get the arrays in this array to display the $email results seperated by commas right now the array is one long string so I get 3 email addresses in one long line <? $sql = "SELECT * FROM tblsubscribeddetails order by intSubID"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $email = $row["email"]; echo $email; } ?> Link to comment https://forums.phpfreaks.com/topic/142079-solved-array-display-question/ Share on other sites More sharing options...
Psycho Posted January 23, 2009 Share Posted January 23, 2009 <?php $sql = "SELECT * FROM tblsubscribeddetails order by intSubID"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $email[] = $row['email']; } echo implode(',', $email); ?> Link to comment https://forums.phpfreaks.com/topic/142079-solved-array-display-question/#findComment-744057 Share on other sites More sharing options...
shadiadiph Posted January 23, 2009 Author Share Posted January 23, 2009 thank you I feel really stupid not to have thought of that I have been using explode with dates all week anyway thanks. Link to comment https://forums.phpfreaks.com/topic/142079-solved-array-display-question/#findComment-744062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.