Created
May 21, 2014 08:48
-
-
Save ranbogmord/40e7d1be5d3dd7466a03 to your computer and use it in GitHub Desktop.
konvert() for Rebecca
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$swe = array('Vit', 'Svart', 'Gul', 'Orange', 'Röd', 'Rosa', 'Lila', 'Blå', 'Grön', 'Brun'); | |
function konvert($fargval, $lang){ | |
if (in_array($fargval, $swe)) { | |
$y=count($swe); | |
for ($x=0;$x<$y;$x++) { | |
if($fargval==$swe[$x]) { | |
echo "<br /><center>" . $fargval . " = " . "$lang[$x]" . "<br /></center>"; | |
} | |
} | |
} else { | |
echo "Felmeddelande här!"; | |
} | |
} | |
switch ($typ) { | |
case 'engelska': | |
$eng=array('White', 'Black', 'Yellow', 'Orange', 'Red', 'Pink', 'Purple', 'Blue', 'Green', 'Brown'); | |
konvert($fargval, $eng); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment