Created
August 13, 2015 04:56
-
-
Save rahman9909/aa42d200d0def80e5da4 to your computer and use it in GitHub Desktop.
Quran uthmani script xml parser. used native simplexml parser. you can get the updated xml script from: http://tanzil.net/updates/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre style="font-size:18px"> | |
<?php | |
$myq = simplexml_load_file('quran-uthmani.xml'); | |
// var_dump($myq); | |
foreach ($myq->sura as $sura) { | |
printf("\nSura: %3d\tName: %s\n", $sura['index'], $sura['name']); | |
foreach ($sura->aya as $aya) { | |
printf("Aya: %3d:%3d\tText: %s\n", $sura['index'], $aya['index'], $aya['text']); | |
} | |
} | |
?> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment