title: php - stristr find exact string
body: <p>I have the following string:</p>
  
  <pre><code>P90 | Ash Wood (Well-Worn)
  </code></pre>
  
  <p>I'm passing this through the following:</p>
  
  <pre><code>$item = str_replace("|","", $item);
  $item = str_replace(" (","-",$item);
  $item = str_replace(")","",$item);
  $item = str_replace(" ","-",$item);
  $item = str_replace("--","-",$item);
  $item = str_replace("™","",$item);
  $item = str_replace("★-","",$item);
  $item = str_replace("★","",$item);
  </code></pre>
  
  <p>Which returns:</p>
  
  <pre><code>P90-ASH-WOOD-WELL-WORN
  </code></pre>
  
  <p>I'm now comparing this string against a file of strings to find a match:</p>
  
  <pre><code>$lines = file(public_path().'/csgoanalyst.txt');
  foreach ($lines as $line) {
      // Check if the line contains the string we're looking for, and print if it does
      if (stristr($line, $item)) {  // case insensitive
           echo $line;
           break;
      }
  }
  </code></pre>
  
  <p>The problem I have is the file contains the follownig:</p>
  
  <pre><code>http://csgo.steamanalyst.com/id/2018/SOUVENIR-P90-ASH-WOOD-WELL-WORN
  http://csgo.steamanalyst.com/id/919/P90-ASH-WOOD-WELL-WORN
  </code></pre>
  
  <p>both lines contain matches therefor are both valid, however I'm looking for an exact match - in this case the second URL.</p>