Hey guys im trying to save the values into an textfile. I tried different ways and always when i open the textfile all the values are written in one line without space. I want to write each value in its own line here is what i have so far:
$filename = 'admin_liste.txt';
$string = '';
foreach($arr as $key => $val) {
$string .= "$val
";
}
file_put_contents($filename, $string);
This writes everything like this in the textfile:
user1user2user3user4
But i want it like this:
- user1
- user2
- user3
- user4
Without the "●"