39 lines
934 B
PHP
39 lines
934 B
PHP
|
<?
|
||
|
|
||
|
class WChiffes {
|
||
|
|
||
|
private static $tabChiffresEnLEttres = array( 0=>'zéro',
|
||
|
1=>'un',
|
||
|
2=>'deux',
|
||
|
3=>'trois',
|
||
|
4=>'quatre',
|
||
|
5=>'cinq',
|
||
|
6=>'six',
|
||
|
7=>'sept',
|
||
|
8=>'huit',
|
||
|
9=>'neuf',
|
||
|
10=>'dix',
|
||
|
11=>'onze',
|
||
|
12=>'douze',
|
||
|
13=>'treize',
|
||
|
14=>'quatorze',
|
||
|
15=>'quinze',
|
||
|
16=>'seize',
|
||
|
17=>'dix sept',
|
||
|
18=>'dix huit',
|
||
|
19=>'dix neuf',
|
||
|
20=>'vingt',
|
||
|
30=>'trente',
|
||
|
40=>'quarante',
|
||
|
50=>'cinquante',
|
||
|
60=>'soixante',
|
||
|
70=>'soixante dix',
|
||
|
80=>'quatre vingt',
|
||
|
90=>'quatre vingt dix');
|
||
|
|
||
|
public function ChiffresEnLettres($chiffre) {
|
||
|
return array_search($chiffre, self::$tabChiffresEnLEttres);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|