Possible Duplicate:
“Cannot use string offset as an array” error
<?php
$marks = 0;
$total = $_POST["lines"];
$quesA = $_POST["ques"];
$quesNo = 1;
$opt = array("","A","B","C","D");
for ($i = 0; $i < $total; $i++)
{
$q = $quesA[$i][0]; // here error
...
Here I assign $quesA = $_POST["ques"];
now it take a variable $q = $quesA[$i][0];
then print in line
echo "<div><b style='color:red;'>Q" . $quesNo . " : </b>"
. "<span style='color:blue;'>" . $q ."</span></div>"
;
here is my code: https://dl.dropbox.com/u/24972447/onlineQuiz.7z