I have a database table with 3 columns; id, question and answer. On the front-end, I have a PHP application that shows questions to the user. The application would then compare the user input with the answer on the database.
Using only PHP, how do I loosely compare user's input with the record on the database and pass it as correct even though it is not a strict match? For example:-
Question: What is the structure of a water molecule? Answer on database: Hydrogen and oxygen Acceptable answers: Oxygen and hydrogen, hydrogen n oxygen, hydrogen & oxygen