Test Ar-PHP Functionality Online

header line!
Test PHP Function







Ar-PHP Manual

method getPrayTime2 [line 413]

array getPrayTime2( )

Calculate Salat times for the date set in setSalatDate methode, and location set in setSalatLocation.



Tags:

return:  of Salat times + sun rise in the following format hh:mm where hh is the hour in local format and 24 mode mm is minutes with leading zero to be 2 digits always array items is [$Fajr, $Sunrise, $Dhuhr, $Asr, $Maghrib, $Isha, $Sunset, $Midnight, $Imsak, array $timestamps]
author:  Hamid Zarrabi-Zadeh <zarrabi@scs.carleton.ca>
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
source:  http://praytimes.org/calculation
access:  public


Example
  1.      date_default_timezone_set('UTC');
  2.  
  3.      include('./I18N/Arabic.php');
  4.      $obj new I18N_Arabic('Salat');
  5.  
  6.      $obj->setLocation(33.513,36.292,2);
  7.      $obj->setDate(date('j')date('n')date('Y'));
  8.  
  9.      $times $obj->getPrayTime();
  10.  
  11.      echo '<b>Damascus, Syria</b><br />';
  12.      echo date('l F j, Y').'<br /><br />';
  13.  
  14.      echo "<b class=hilight>Imsak:</b> {$times[8]}<br />";
  15.      echo "<b class=hilight>Fajr:</b> {$times[0]}<br />";
  16.      echo "<b class=hilight>Sunrise:</b> {$times[1]}<br />";
  17.      echo "<b class=hilight>Zuhr:</b> {$times[2]}<br />";
  18.      echo "<b class=hilight>Asr:</b> {$times[3]}<br />";
  19.      echo "<b class=hilight>Sunset:</b> {$times[6]}<br />";
  20.      echo "<b class=hilight>Maghrib:</b> {$times[4]}<br />";
  21.      echo "<b class=hilight>Isha:</b> {$times[5]}<br />";
  22.      echo "<b class=hilight>Midnight:</b> {$times[7]}<br />";
Popular
Recent
Links
Ads!
footer line!

No Software Patents! General Public License

Home | Twitter | Blog | Contact

Copyright © 2006 - 2016 Khaled Al-Sham'aa