I have a text file (word) composed of four pages with several e-mail addresses separated from each other by semicolons.
It's like this:
[email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected];
I would like it to look like this:
[email protected];
[email protected];
[email protected];
[email protected];
[email protected];
[email protected];
I believe you can do it using php where, it will be done a "read file" that for each; (semicolon) found will have a line break ...
I would like help getting this.
My code for now reads the file and prints the result on the screen ....
<?php
// Abre o Arquvio no Modo r (para leitura)
$arquivo = fopen ('emails.txt', 'r');
// Lê o conteúdo do arquivo
while(!feof($arquivo))
{
//Mostra uma linha do arquivo
$linha = fgets($arquivo, 1024);
echo $linha.'<br />';
}
// Fecha arquivo aberto
fclose($arquivo);
?>