Hello, I am having a problem with preg_split. Here is my code
<?php
$Results = file("output.txt");
// Remove spaces, put each entry in it own variable
$Final = preg_split("/[\s]+/", $Results);
echo "Results array<br>";
print_r($Results);
echo "<br>Final array<br>";
print_r($Final);
?>
The $Results array prints the file contents.
But the $Final array prints:
Final array
Array ( [0] => Array )
I have tried using preg_split("/\s+/", $Results); as well.
Any idea why its doing this?