Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form action="" method="POST">
- <input type="text" name="text" />
- <input type="submit" value="احسب عدد المسافات" />
- <br /> <br />
- </body>
- </html>
- <?php
- if (isset($_POST["text"]))
- {
- $text = $_POST["text"];
- $count = substr_count($text , " ");
- if ($count != 0)
- {
- echo "عدد المسافات في النص = ". $count;
- }
- else {
- echo "لاتوجد أي مسافة";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement