- <!--
- To change this template, choose Tools | Templates
- and open the template in the editor.
- -->
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- if(isset($_POST['submit']))
- {
- if(isset($_POST['totranslate']))
- {
- $totranslate = $_POST['totranslate'];
- $replace = array("ă", "â", "î", "ș", "ț");
- $replacewith = array("a", "a", "i", "s", "t");
- $translated = str_replace($replace, $replacewith, $totranslate);
- echo $translated;
- }
- } else {
- echo ' <form action="index.php" method="POST">
- <textarea name="totranslate" cols="50" rows="30"></textarea>
- <br>
- <input type="submit" value="Convertire" name="submit">
- </form>';
- }
- ?>
- </body>
- </html>
Am creat o mică pagină web care să mă ajute să înlocuiesc diacriticile cu litere corespunzătoare dar se pare că ț și ș nu sunt înlocuite și rămân la fel. Vă rog un mic ajutor. Mai jos aveți codul.
L.E. (-- 23 Dec 2010, 16:22 --)
Se pare că cele scrise cu mâna mea mi le înlocuiește, dar pe cele de pe Wikipedia nu prea.
Welcome to BitCell. Click here to register !
