I am hoping someone can point in the right direction here, been surfing the internet for hours and haven't found a solution.
First, I am an "OKAY" php coder .. so this might be obvi but I am lost.
I have a txt file with array() in from a pull in an api transaction list.
Array
(
[orderid] => 00000000
[type] => rebill
[paystatus] => cancelled
)
Array
(
[orderid] => 000000
[type] => rebill
[paystatus] => cancelled
)
Array
(
[orderid] => 000000
[type] => refund
[paystatus] => cancelled
[productid] => 939399393
[firstName] => XXXXXX
[lastName] => XXXX
[customeremail] => XXXX
[amount] => XX.XX
[refunddate] => 2015-01-01
[refundstatus] => ok
)
There is thousands of these array()'s ... I am use to dealing with json etc to pull for each, but right now I am lost completely.
I am able to replicate the file with
$f = fopen("merged.txt", "r");
// Read line by line until end of file
while(!feof($f)) {
echo fgets($f) . "<br />";
}
fclose($f);
... that's it
I have played around with all kinds of foreach while etc and can't get it to work. If someone could point in the right direction, I would appreciate it so much.
Thanks!