2
I have a text file (word) composed of four pages with several email addresses on each side separated by comma and dot.
Is that way:
[email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected];
I’d like it to stay that way:
for [email protected];
[email protected];
for [email protected];
for [email protected];
[email protected];
[email protected];
I believe that can be done using php where, will be made a "read file" that for each ; (point and comma) found will have a line break...
I would like help to achieve 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);
?>
What you’ve already done?
– Maniero
For now nothing yet, I’m trying to read the file and print the result...I’m trying to assemble the code
– Charles Fay
Assemble something, post it there and tell us what your specific question is so we can help you. It’s not nice to ask to do everything for you.
– Maniero
@bigown, follow my code ... need now to do the line break
– Charles Fay
It already worked with the str_replace...was easier than I imagined. Thank you
– Charles Fay