View Single Post
ישן 22-02-08, 13:40   # 10
pirsomet
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Jan 2008
הודעות: 104

pirsomet לא מחובר  

או שאפשר לעשות כך
קוד:
<?php
echo <<<lala
 <meta http-equiv="Content-Type" content="text/html; charset=Windows-1255"/>
    <form method="POST" action="">
          <center><font face="Tahoma" size="1"><textarea rows="5" cols="20" name="T1"></textarea> <b>:טקסט</b>
      <center><input type="submit" value="send" name="B1">
lala;
$string = $_POST['T1'];
$keywords = array("משחק", "שלב", "קוד");
    $found=0;
$string=" $string";    
    foreach($keywords as $word)
    {   
        if(strpos($string, $word,0))
        {
        $found=1;    
        }    
    }
if(isset($_POST['B1']))
{
    if($found == 0)
    {
        echo "<br><br>במחרוזת לא מצוי אחד מהמילים";
    }
    else
    {
        echo "<br><br>במחרוזת יש את אחד מהמילים";
    }
}
?>
  Reply With Quote