title: PHP code doesn't work properly
body: <p>i've recently started to use php and i am trying to load the content of a website that has a list of file names with (.txt)format.Moreover, i have created a function : </p>
  
  <pre><code>&lt;?php
  //--------------------------
  // The function itself
  //--------------------------
  function LoadSource($siteurl) {
  
      $arrText = file($siteurl);
      for ($i=0; $i&lt;count($arrText); $i++) {
  
          $pos = strpos($text . $arrText[$i], "+CUSERR+");
                  if ($pos !== false) {
                     echo "The string +CUSERR+ was found in the string";
                        $text = $text . $arrText[$i]." ==&gt; REJECTED";
                        } else {
                                 echo "The string +CUSERR+ was not found in the string";
                        $text = $text . $arrText[$i]." ==&gt; ACCEPTED";
                        }
  
      }
  
          return $text;
      }
  $source = loadSource("http://www.example.com");
  echo $source; 
  
  ?&gt;
  </code></pre>
  
  <p>what i am trying to do is, First to load the content of that website and then display (Rejected) Beside the txt file name that has (CUSERR) word in it or (Accepted) beside the txt file name that has (CUSACK) word.</p>
  
  <p>Example : </p>
  
  <p>Url : www.example.com</p>
  
  <p>Content : </p>
  
  <pre>
  file1.txt Rejected 
  file2.txt Accepted
  </pre>