PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Khaled Al-Shamaa   ArGender   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ArGender
Guess the gender of Arabic names
Author: By
Last change: Define character set explicitly when get a class instance
Date: 17 years ago
Size: 2,350 bytes


Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

<meta http-equiv="Content-Type" content="text/html;charset=windows-1256" />
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<title>Arabic Gender Guesser</title>


<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>

<div class="Paragraph">

<h2>Arabic Gender Guesser</h2><br />

<div class="img-shadow">
<img src="images/thumb.jpg" alt="Khaled Al-Sham'aa" border="0" width="150" height="113" />

      <span class="FirstChar">A</span>rabic nouns are either masculine or feminine. Usually when referring
      to a male, a masculine noun is usually used and when referring to a female, a feminine noun is used.
      In most cases the feminine noun is formed by adding a special characters to the
      end of the masculine noun.
      Its not just nouns referring to people that have gender. Inanimate objects (doors, houses, cars, etc.)
      is either masculine or feminine. Whether an inanimate noun is masculine or feminine is mostly arbitrary.

= file('list.txt');
$charset = 'windows-1256';

$check = new ArGender($charset);

<table border="0" cellspacing="2" cellpadding="5" width="60%">
  <tr><td colspan="2"><b>Al Jazeera Reporters:</b></td></tr>
    <td bgcolor="#27509D" align="center" width="50%">
      <b><font color="#ffffff">Name (sample input)</font></b>
    <td bgcolor="#27509D" align="center" width="50%">
      <b><font color="#ffffff">Gender (auto generated)</font></b>

foreach($names as $name){
$check->isFemale($name) == true){
$gender = 'Female';
$bgcolor = '#FFF0FF';
$gender = 'Male';
$bgcolor = '#E0F0FF';
'<tr><td bgcolor="'.$bgcolor.'" align="center"><font face="Tahoma">'.$name.'</font></td>';
'<td bgcolor="'.$bgcolor.'" align="center">'.$gender.'</td></tr>';


<br />