Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Ikä</title>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
- </head>
- <body>
- <form action="" method="post">
- Teksti: <input type="text" name="input"> <br />
- Monta kertaa pärisee ;D: <input type="text" name="amount"> <br />
- <input type="submit" value="Lähetä">
- </form>
- <?php
- for($o = 0; $o < $_POST['amount']; $o++) {
- for($i = 0; $i < strlen($_POST['input']); $i++) {
- if ($i % 2 == 0)
- print '<span style="color:red">' . $_POST['input'][$i] . '</span>';
- else
- print '<span style="color:blue">' . $_POST['input'][$i] . '</span>';
- }
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment