PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Khaled Al-Shamaa   ArMktime   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ArMktime
Convert date to timestamp in the Islamic calendar
Author: By
Last change:
Date: 17 years ago
Size: 1,413 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<title>MakeTime for Arabic/Islamic Hegri Calendar</title>
</head>

<body>

<center>
<div style="width: 80%; position:absolute; left:10%; top:0%; z-index:1">
<br />
<div class="tabArea" align="center">
  <a class="tab" href="example.php">Example</a>
  <a class="tab" href="about.html">About</a>
</div>

<div class="Paragraph">

<h2>Example Code</h2><br />

<?php

$code
= <<<END
<?php
include('ArMktime.class.php');
\$x = new ArMktime();

\$time = \$x->mktime(0, 0, 0, 9, 1, 1427);

echo "Calculated first day of Ramadan 1427 unix timestamp is: \$time<br>";

\$Gregorian = date('l F j, Y',\$time);

echo "Which is \$Gregorian in Gregorian calendar";
?>
END;

highlight_string($code);
?>

<h2>Example Output</h2><br />

<?php
include('ArMktime.class.php');
$x = new ArMktime();

$time = $x->mktime(0, 0, 0, 9, 1, 1427);

echo
"Calculated first day of Ramadan 1427 unix timestamp is: $time<br>";

$Gregorian = date('l F j, Y',$time);

echo
"Which is $Gregorian in Gregorian calendar";
?>
<br /><br />
</div>
</div>
</center>
</body>
</html>