Question: ```
for($c=1;$c<=$num;$c++)
{

$row=mysql_fetch_array(mysql_query("SELECT * FROM `$quiztitle` WHERE id=$c"));

        if($row['answer']==$_POST['answer'][$c]) // NOT WORKING
            {
                echo "correct";
                echo "<br>";
            }

        else
            {
                echo "incorrect";
                echo "<br>";
            }
    }

```

on the line where it says "NOT WORKING",
the index [$c] does not get the value from the loop.
but when i specify it and change it to $\_POST['answer1'], it is working.
what is the correct syntax for this?

Answer: 
Try this. 

for($c=1;$c<=$num;$c++)
 {

```
 $row=mysql_fetch_array(mysql_query("SELECT * FROM `$quiztitle` WHERE id=$c"));

    if($row['answer']==$_POST['answer'.$c]) // NOT WORKING
        {
            echo "correct";
            echo "<br>";
        }

    else
        {
            echo "incorrect";
            echo "<br>";
        }
}

```
Correct is:

```
if ($row['answer'] == $_POST['answer' . $c]) {
  ....
}

```