<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Konwersja</title>
</head>
<body>
<p>
<?php

function konwertuj($ciag, $tryb = "iso")
{
  $cp1250 = "¡¬±¼¶¦";
  $iso88592 = "·&not;&plusmn;¥&para;&brvbar;";

  if($tryb == "iso"){
    $ciag = strtr($ciag, $cp1250, $iso88592);
  }
  else if($tryb == "cp1250"){
    $ciag = strtr($ciag, $iso88592, $cp1250);
  }  
  return $ciag;
}

if(isSet($_POST['dane'])){
  echo "Po konwersji:<br />";
  echo konwertuj($_POST['dane']);
}

?>

</p>
</body>
</html>