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; } ?> Quote Link to comment 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); ?> Quote Link to comment 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. 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.