For each line, try the following:
$arr = preg_split('/ /', $line);
if(count($arr) === 3)
{
}
else
{
}
Yes, this code is terrible, but it works ... And it stores all your data. It is important to use a preg_split
non-obsolete method split
.
source
share