Hello,
I write a script that looks into a directory, opens every file and reads these files into 1D matrix. Problem is that files have an empty lines.
My question is: how can I remove these empty entries from matrix ?
This is an example 1D matrix with empty entries.
Code:
[data1]
[]
[data2]
[data3]
[]
and here is my php code I use to read from files:
Code:
while($full_info[$i] = fgets ($fd,1024)){
//some code here
$i++;
}
I'll be glad for any help,
Best regards :)