PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Khaled Al-Shamaa   ArNumbers   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ArNumbers
Spell numbers in the Arabic idiom
Author: By
Last change: Fix example parameters
Date: 17 years ago
Size: 1,884 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=windows-1256" />
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<title>Spell numbers in the Arabic idiom</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 1: المعدود مذكر مرفوع</h2><br />

<?php

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

\$x->setFeminine(1);
\$x->setFormat(1);

\$integer = 2147483647;

\$text = \$x->int2str(\$integer);

echo "<center>\$integer<br />\$text</center>";
?>
END;

highlight_string($code);
?>

<h2>Example Output 1:</h2><br />

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

$x->setFeminine(1);
$x->setFormat(1);

$integer = 2147483647;

$text = $x->int2str($integer);

echo
"<center>$integer<br />$text</center>";
?>
<br /><br />


<h2>Example Code 2: المعدود مؤنث منصوب أو مجرور</h2><br />

<?php

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

\$x->setFeminine(2);
\$x->setFormat(2);

\$integer = 2147483647;

\$text = \$x->int2str(\$integer);

echo "<center>\$integer<br />\$text</center>";
?>
END;

highlight_string($code);
?>

<h2>Example Output 2:</h2><br />

<?php

$x
->setFeminine(2);
$x->setFormat(2);

$integer = 2147483647;

$text = $x->int2str($integer);

echo
"<center>$integer<br />$text</center>";
?>
<br /><br />

</div>
</div>
</center>
</body>
</html>