Hi,
I have a .txt file with product data, which I want to read in php. Each line contains one product, and the product details (number, name and price) are separated by tabs. As you can see below, it is not always true that the prices are nicely aligned vertically, because of the difference in length for the prodcut names. The data look like this:
ABC001 an item description $5.50
XYZ999 an other item $6
PPP000 yet another one $8.99
AKA010 one w a longer name $3.33
J_B007 a very long name, to show tabs $99
(I didn't know how to show the tabs, so they are spaces in the example above, but in the real file, it are real tabs)
What is the most efficient way to do this? (by the way, it is a remote file) I would love to have an array containing the product data per product:
$product['number'], $product['name'] and $product['price']
Thanks very much!