Get the sunrise time for Lisbon, Portugal today in PHP

Description

The following code shows how to get the sunrise time for Lisbon, Portugal today.

Example


/*  w  w w.  ja va  2s . c o  m*/
<?php
    // Lisbon, Portugal:
    // Latitude: 38.4 North, Longitude: 9 West
    // Zenith ~= 90, offset: +1 GMT

    echo("Lisbon, Portugal: Date: " . date("D M d Y"));
    echo("<br>Sunrise time: ");
    echo(date_sunrise(time(),SUNFUNCS_RET_STRING,38.4,-9,90,1));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone