no es mas facil y legible asi.... para empezar
Código PHP:
if(empty($_POST['pregunta'])){
echo "error la variable llega vacia";
}//end if
$mi_respuesta = $_POST['pregunta'];
$total_respuesta = count($mi_respuesta);
for($i=1;$i<=$total_respuesta;$i++){
mysql_query("INSERT INTO encuesta values('???USAS ID AUTOMATICO????','".$_POST['c_unidad']."','".$_POST['c_profesor']."','".$_POST['c_materia']."','".$i."','".$mi_respuesta['$i']."')") or die("MySQL dice: ".mysql_error());
}//end for
si en tu tabla no usas id automatico quita '???USAS ID AUTOMATICO????',