有没有比这个更好的方法来分隔数组的值?
<?php
$q = "SELECT * FROM students LEFT JOIN Groepen ON Groepen.groep_id=students.groep WHERE students.uid = '$user[uid]'AND students.groep = '$groep[groep_id]' ORDER BY st_last ASC";
$r = mysqli_query($dbc, $q);
while($students_in_group = mysqli_fetch_assoc($r)) {
?>
<?php echo $students_in_group['st_first']." ".$students_in_group['st_last'].", "; ?>
<?php } ?> </p>
上面的代码也在姓氏后添加逗号。
我还想使用$ students_in_group [email]向群组的所有成员发送电子邮件。我想我也必须将他们的电子邮件地址分开?