$whichwrong = "The following questions were not answered correctly: \n\n";
$whichwrong .= "Question Number: $questionNum || Your Answer: $userAnswers[$s][$q]\n";
echo $whichwrong;
显示:
以下问题未正确回答: 问题编号:2 || 您的答案:b 问题编号:4 || 您的答案:c 问题编号:5 || 你的答案:一个问题编号:1 || 您的答案:b 问题编号:3 || 您的答案:b 问题编号:1 || 您的答案:b 问题编号:2 || 你的答案:一个问题编号:1 || 您的答案:b 问题编号:2 || 你的答案:b
为什么"\n"
不能正常工作?
同时这工作得很好:
$totalValue .= "Correct: {$correct}\n";
$totalValue .= "Wrong: {$wrong}\n";