Hi,
I have text files, with colums of data in them. I would like to grab the content of these files, and get each colum, by first reading the file:
$content = file('file.txt')
and then getting each value into an array:
$currentrow = explode (" ", $content[$i]);
Now I have the problem that the colums are seperated by unequal number of spaces (one row there might be 6 spaces between rows, on the next there might be 4, it is a formatted datafile..).
Now I would like to replace all occasions of " " (double space) with " " (Single space).
I know I should use regular expressions, but I have no clue how to use them/where to start, and the manual is not te best resource to learn regular expr. I have found...
Anybody who can help me out with a line of code??