Inspired by Facebook Friends Status who's being so dizzy looking for "functions calculated using the Vietnamese language".
And the I've got an Idea for editing my code to be Vietnamese through "Om Google".
This is it... :
And the I've got an Idea for editing my code to be Vietnamese through "Om Google".
This is it... :
**Mohon dibantu ya… Sim salabim jadi apa .?? prok prok.. prok.. :)**
COPAS this code code., and save with name terbilang_vietnam.php :
<html>
<head>
<title>functions calculated using the Vietnamese language</title>
</head>
<body>
<form action=”terbilang_vietnam.php” method=”post”>
Masukkan angka: <input type=”text” value=”" name=”angka”>
<input type=”submit” value=”Send”>
</form>
<pre>
<?php
$angka = isset($_POST['angka']) ? $_POST['angka'] : “0″;
if ($angka) {
echo number_format($angka, 0) . “<br>”;
echo ucwords(Terbilang($angka));
}
?>
</pre>
</body>
</html>
<?php
function Terbilang($x) {
$abil = array(“”, “one”, “hai”, “ba”, “four”, “nam”, “six”, “seven”, “eight”, “nine”, “ten”, “eleven”);
if ($x < 12)
return ” ” . $abil[$x];
elseif ($x < 20)
return Terbilang($x – 10) . “lòng thuong xót”;
elseif ($x < 100)
return Terbilang($x / 10) . ” hai muoi” . Terbilang($x % 10);
elseif ($x < 200)
return ” hundred” . Terbilang($x – 100);
elseif ($x < 1000)
return Terbilang($x / 100) . ” hundred” . Terbilang($x % 100);
elseif ($x < 2000)
return ” ngàn” . Terbilang($x – 1000);
elseif ($x < 1000000)
return Terbilang($x / 1000) . ” ngàn” . Terbilang($x % 1000);
elseif ($x < 1000000000)
return Terbilang($x / 1000000) . ” trieu” . Terbilang($x % 1000000);
}
?>
Hopefully can help my friend....
Sorry for mistake in translate from Indonesian to Vietnamese :)
Because I'm not Vietnamese.
Just let me Know if I'm Wrong
See ya..
Wassalamualaikum Wr. Wb.
Rgds,
Kiki SNE