Data from a XML sheet is converted to php array and I have tried to create a quiz format question with the below code, but it does't work. Not sure how to get it working for multiple questions...

Code:
    <?php
    function get_answer($input){
    if ($input == ($att['ans']) )
    {echo
    "Correct Answer . {$att['ans_desc']}";
    }
    else {
    echo "Wrong Answer . {$att['ans_desc']}";
...