I am trying to get PHP to check and mark student answers against the correct answers from a MySQL table.
I need to standardize the apostrophes. Their Chinese input methods sometimes use strange apostrophes.
$studiAnswers is: haven’t written
$correctAnswers is: haven’t written|have not written
I explode(’|’, $correctAnswers[$i]) then check if the student answer is in $thisAnswer
The apostrophe in $studiAnswers has the number 8127, according to Python:
But the apostrophe in $correctAnswers has the number 39 and this makes the student answer wrong.
Is str_replace() the best way to do this?