I am facing serious problem over some days. Trying to explode each line from something.txt file and make an array. But array structure not like what I want. My code is given below
for ( $i=0; $i<count($_FILES['data']['name']['Question']['uploadfiles']); $i++) {
foreach(file($_FILES['data']['name']['Question']['uploadfiles'][$i]) as $line) {
$LineData[] = explode("\n",$line);
}
}
Some of the file lose the proper array structure. Just like
Array
(
[0] => Array
(
[1] =>
A. Hemophilia A
B. Hemophilia B
[2] => C. Von Willebrand disease
D. Idiopathic thrombocytopenic purpura
)
)
But I want the array structure like this:
Array
(
[0] => Array
(
[1] => A. Hemophilia A
[2] => B. Hemophilia B
[3] => C. Von Willebrand disease
[4] => D. Idiopathic thrombocytopenic purpura
)
)