1

Temat: str_replace i substr

<form method="post">
  <p>text1: <input type="text" name="t"></p>
  <p><input type="submit" value="Zapisz"></p>
</form>
<?php
  //
  if ($_POST)
  {
    if (isset($_POST['t'])) $t=$_POST['t']; else $t='';
    $x = str_replace("a", "b", $t);
    echo "<hr>";
    $r = substr($x, 1, 2);
    echo $r;
  }
?>