I'm not sure exactly why you chose to use this form of syntax, as mentioned in a comment, this would be a nightmare to debug... A switch case might be a better choice here -
$vehicle = '';
switch($transport){
case 'B' :
$vehicle = 'bus';
break;
case 'A' :
$vehicle = 'airplane';
break;
...
default:
// undefined cases
break;
}
References -