|
Posted by Nico on 03/22/06 20:42
"Geoff Berrow" <blthecat@ckdog.co.uk> a ιcrit dans le message de news:
c063225l4v98ubvmib71d2mg1pk4d9os10@4ax.com...
> Message-ID: <44217e7e$0$471$626a54ce@news.free.fr> from Nico contained
> the following:
>
>>
>>I have a .txt file with a lot of text mixed with some email addresses. I
>>would like to get all the email addresses in a $mails[] variable. Does
>>anyone know how to do this in php.
>
> Yes
>>
>>Thanks a lot for your help,
>
> You're welcome. :-)
>
> Oh, you'd like to know ?
>
> Use implode() to get all the words in the text into an array. Then loop
> through the array checking each word with strpos() to see if it contains
> an @symbol. If it does, assign it to a new array. The new array will
> contain everything with a @ symbol, probably mostly email addresses.
Thank you very mch, but I have no idea how to use arrays, I am a begginer,
could you please write the code for me ? I'm sorry/
[Back to original message]
|