SHARE
TWEET

spaces count

a guest Feb 14th, 2020 153 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3. <form action="" method="POST">
  4. <input type="text" name="text" />
  5. <input type="submit" value="احسب عدد المسافات" />
  6. <br /> <br />
  7. </body>
  8. </html>
  9. <?php
  10. if (isset($_POST["text"]))
  11. {
  12.     $text = $_POST["text"];
  13.     $count = substr_count($text , " ");
  14.     if ($count != 0)
  15.     {
  16.         echo "عدد المسافات في النص = ". $count;
  17.     }
  18.     else {
  19.         echo "لاتوجد أي مسافة";
  20.     }
  21. }
  22. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top