I'm looking for how to save the contents of an array in .txt:
<?php
$resul = array('hermaniribeiro', 'Ebtsama', 'BrittoOFC', 'CheesterG', 'dsolutec', 'ExpoGanSon', 'dsolutec', 'ExpoGanSon', 'dsolutec', 'BelforFx', 'kunakrec', 'YouTube', 'Dasabuvir', 'greentechmedia', 'bardomsw', 'MdeMotion', 'iAnonymous', 'WilliamCorvera', 'MadridVen', 'Bertty17', 'SoyBobMarley', 'joseapontefelip', 'la_patilla', 'hootsuite', 'fawkestar70', 'starwars');
$file = fopen("user.txt", "a");
foreach($resul as $final){
fwrite($file, PHP_EOL ."$final");
}
fclose($file);
?>
I try it that way but it only prints the result but it does not save it and what I'm looking for is to save it as it prints it with line break.