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.
For example:
$studiAnswers[8] is: haven’t written
$correctAnswers[8] is: haven’t written|have not written
I explode(’|’, $correctAnswers[$i]) then check if the student answer is in $thisAnswer
The apostrophe in $studiAnswers[8] has the number 8127, according to Python:
ord(’’’)
8217
But the apostrophe in $correctAnswers[8] has the number 39 and this makes the student answer wrong.
Is str_replace() the best way to do this?