Difficulty on how to extract data out of a text with string functions.
| From: | Andy | Date: | Wed, 06 Mar 2002 18:49:59 +0000 |
| Subject: | Difficulty on how to extract data out of a text with string functions. | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-db+get-17522@lists.php.net to get a copy of this message | ||
Hi there,
I want to include some data into my website which covers malaria and yellow
feewer related to each country. On the WHO website are all the infos I need.
Their webmaster told me that unfortunatelly there is no db behind that and
everything gos with html files. But I am free to extract that data.
Well, I did create a txt file which looks more or less like that:
ALGERIA
Yellow fever: A yellow fever vaccination certificate is required from
travellers over 1 year of age coming from infected areas.
Malaria: Malaria risk is limited. One small focus (P. vivax) has been
reported in Ihrir (Illizi Department), but this is isolated and access is
difficult.
Recommended prophylaxis: none.
AMERICAN SAMOA
Capital: Pago Pago
Altitude: 10 m
Yellow fever: A yellow fever vaccination certificate is required from
travellers over 1 year of age coming from infected areas.
Now I have a table in a MySQL db naming all those countries. The goal is to
extract the Yellow fever and Malaria line and put it into a mysql table
related to the countries.
I saw that PHP has some good functions on text, but do u guys think this
could be done??? Doing it by hand could take allllloooong loooooong while.
I am open for any idea!
Thanx a lot for any help
Cheers, Andy