I'm trying parse a tab delemited text file into a set of PHP arrays, and help would be very much appreciated.
The .txt wil look like this (tab delimited not spaces)
data1a data1b data1c data1d
data2a data2b data2c data2d
data3a data3b data3c data3d
data4a data4b data4c data4d
and so on
I wish the PHP arrays to look like this
$arrayA = array('data1a', 'data2a', 'data3a', 'data4a');
$arrayB = array('data1b', 'data2b', 'data3b', 'data4b');
$arrayC = array('data1c', 'data2c', 'data3c', 'data4c');
$arrayD = array('data1d', 'data2d', 'data3d', 'data4d');
And I need the .txt file uploaded by a simple html form, e.g.
<form action="form.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
Any ideas on the code to place inside form.php?
Many thanks!