file_put_contents() With Array Argument

no-email (Gina Peter Banyard), Gina Peter Banyard
Sun, 21 Jan 2024 00:00:00 +0000

The second argument of file_put_contents() is typed as ``mixed``. It may be a string, which is the most common case. It may be a stream, (aka, a resource), which pours a file into a file.
It also may be an array. PHP simply writes the elements of the array in the file, like an ``implode('', $array)``.