$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";