[eluser]Mr.SoOoMa[/eluser]
Hello there ,, i'm working with function to give the users the ability to import MCQ questions with answers from text ..
Code:
$string='Question
choice-2nd-3rd-4th
C';
list ($question,$choices,$answer) = preg_split ('/$\R?^/m', $string);
$choices= explode ('-', $choices);
echo "question :".$question;
echo '<br />';
echo "A.".$choices[0];
echo '<br />';
echo "B.".$choices[1];
echo '<br />';
echo "C.".$choices[2];
echo '<br />';
echo "D.".$choices[3];
echo '<br />';
echo "Answer :".$answer;
1 . Can codeigniter help me to make the function more helpful or to shorten the code ??
2 . How can i make it with more than question in the same time ??