Hello,
I've got a plain text file that stores information that looks something like:
Ecom_ShipTo_Postal_Name|John
Ecom_ShipTo_Postal_Last|Doe
Compute_Coupons|
Compute_Insurance|
Ecom_ShipTo_Online_Email|nobody@email.com
Ecom_ShipTo_Postal_Company|Acme
...etc
I'd like to be able to chop it up into a variable, array, whatever so I can use the names and values. I was going to do something like:
...
(get file contents)
...
$filearray = explode("|" , $contents);
but then I realized that if something was blank, such as the bit like:
Compute_Coupons|
Compute_Insurance|
It would throw off my counting
(e.g. $filearray[$i] where $i is even would be my field names, and the odds would be my values).
I'm sure this is relatively simple to do, I'm just not sure where I need to be looking =/