[PHP] Al'bhed translator

Questions about programming languages and debugging
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

[PHP] Al'bhed translator

Post by ayu »

Me and Swan was talking about Al'bhed to English translators in PHP a while ago and that we were both going to make one just for the fun of it, well we did and I lost mine when cleaning the HDD. So I remade it yesterday in a simplified version with no html form or anything, but the mechanism is there though ^^

EDIT: Forgot to mention that this is from Final Fantasy :roll:

Code: Select all

<?php

$albh = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$engh = array("e","p","s","t","i","w","k","n","u","v","g","c","l","r","y","b","w","h","m","d","o","f","x","q","a","g");
$string = "hello";

for($i = 0; $i < strlen($string); $i++)
{

	for($j = 0; $j < 26; $j++)
	{
	
		if($string[$i] == $engh[$j])
		{
			$string[$i] = $albh[$j];
			break;
		}
	}
}

echo $string;

?>
Last edited by ayu on 04 Jun 2008, 06:00, edited 1 time in total.
"The best place to hide a tree, is in a forest"

User avatar
n3rd
Staff Member
Staff Member
Posts: 1474
Joined: 15 Nov 2005, 17:00
18
Location: my own perfect world in ma head :)
Contact:

Post by n3rd »

like 7 years to late, but still good job :)
[img]http://img580.imageshack.us/img580/8009/userbar2k.png[/img]

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Well it's still a good game ^^
"The best place to hide a tree, is in a forest"

Post Reply