Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $string="apricottt";
- $francais = 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');
- $albhed = array('y','p','l','t','a','v','k','r','e','z','g','m','s','h','u','b','x','n','c','d','i','j','f','q','o','w');
- function traduction($string)
- {
- global $francais;
- global $albhed;
- $stringTraduite="";
- $lettres = str_split($string);
- print_r($lettres);
- foreach ($lettres as $value)
- {
- foreach ($francais as $cle => $valeur)
- {
- if($value == $valeur)
- {
- $stringTraduite.=$albhed[$cle];
- }
- }
- }
- echo $stringTraduite;
- }
- traduction($string);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Al-Bhed translator</title>
- <meta charset="utf-8" />
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement