Reputation: 7
file_put_contents($file, array_values($delivery[0]), FILE_APPEND);
That prints to file all values in the same row. How to print all values their own line?
Upvotes: 0
Views: 107
Reputation: 34556
You need to implode the values into a string, separated by (in your case) a new line.
file_put_contents(
$file,
implode("\n", array_values($delivery[0])),
FILE_APPEND
);
Upvotes: 2