php strpos special characters
<p>I'm using PHP Version 5.1.6</p>

<p>I have a string (session file) and need to extract a value from it, so i'm searching for a needle in the string but it returns false, I reduced the code to this:</p>

<pre><code>$string = ';SERVER_NAME|s:17:"stackoverflow.com";REMOTE_ADDR|s:13:"69.59.196.211";';
$start = strpos($string, ';SERVER_NAME|s:"');
echo $start; // prints nothing because $start = false

$start = strpos($string, 'SERVER_NAME|s:');
echo $start; // prints 1;
</code></pre>

<p>As you noticed if I have the character ';' or the character '"' in the needle, the search returns false, I tryed to use chr() for all characters in the needle but had the same result, If I remove the ';' and the '"' from the string if finds the needle in the string.</p>

<p>How can I search special characters in a string using PHP ?</p>
