0

Possible Duplicate:
Best XML Parser for PHP

I would like to display the array I get from this url in a table in my website. However I have no clue where to begin. The link is

http://www.islamicfinder.org/prayer_service.php?country=usa&city=germantown&state=MD&zipcode=20876&latitude=39.2074&longitude=-77.2311&timezone=-5&HanfiShafi=1&pmethod=5&fajrTwilight1=10&fajrTwilight2=10&ishaTwilight=10&ishaInterval=30&dhuhrInterval=1&maghribInterval=1&dayLight=1&simpleFormat=xml

Thanks for any help.

Community
  • 1
  • 1

1 Answers1

0

Why don't you try this simple HTML parser?

$data = Array();
$html = file_get_html('http://www.islamicfinder.org/prayer_service.php?country=usa&city=germantown&state=MD&zipcode=20876&latitude=39.2074&longitude=-77.2311&timezone=-5&HanfiShafi=1&pmethod=5&fajrTwilight1=10&fajrTwilight2=10&ishaTwilight=10&ishaInterval=30&dhuhrInterval=1&maghribInterval=1&dayLight=1&simpleFormat=xml');

foreach($html->find('prayer') as $prayer)
{
    $data['fayr']    = $prayer->find('fayr', 0)->plaintext;
    $data['sunrise'] = $prayer->find('sunrise', 0)->plaintext;
    $data['dhur']    = $prayer->find('dhur', 0)->plaintext;
}
Tommaso Belluzzo
  • 23,232
  • 8
  • 74
  • 98