I got string that I split using 'explode()'.But I need some more steps to do.I have to split that array output few more times by delimiter.
The txt file's contents look like
Question1|opt1,opt2,opt3;Question2|opt1,opt2,opt3;question3|opt1,opt2,opt3;Question4|opt1,opt2,opt3;
Please have a look at the code
$open=fopen("mydata.txt","r+");
while(!feof($open)){
$see=fgets($open);
$exp=explode(";",$see);
//$exp1=explode("|",$exp);
//$exp2=explode(",",$exp1);
$vaq = "</br> ".$imp[0];
echo $vaq;
}
fclose($open);
what I need is to echo in following format
Question1
Opt1
Opt2
Opt3
Question2
Opt1
Opt2
Opt3
.......
.......
.......
I know 'explode()' split string and output array.but even after that tried to see the result.It gives me error.
Look forward for expert assistance.
Thanks in advance.
, but otherwise good answer +1 – l'L'l Oct 02 '14 at 01:13