// Print array to a file // http://stackoverflow.com/questions/2628798/print-array-to-a-file file_put_contents("log.txt", print_r($what, true) . "\n", FILE_APPEND);