$value){ $input = str_replace($key, $value, $input); } echo "\n"."\n"; echo "Answer: "."\n"; echo "$input"."\n"."\n"; } } if(isset($input) && $input != '' && $input == '2'){ echo "Insert text: "."\n"; $input = trim(fgets($stdin)); if(isset($input) && $input != ''){ $input = mb_strtoupper($input); foreach($characters as $key => $value){ $input = str_replace($value, $key, $input); } echo "\n"."\n"; echo "Answer: "."\n"; echo "$input"."\n"."\n"; } } ?>