$string[i] does not return the i:th character
<p>I'm writing a function intended to sanitize a poorly formatted string which the php script will receive from an outside source. The problem with this string is that every odd numbered byte is zero, so what the function does is that it pushes every even numbered byte to a new array. <a href="http://pastebin.com/LLdZq7mW" rel="nofollow">Code</a>:</p>

<pre><code>$serverInfoClean = array();
for ($i = 0; $i &lt; strlen($serverInfo); $i++ ) // Remove every odd numbered byte
{
    if ($i &amp; 1) // Odd index
    {
        // Do nothing
    } 
    else // Even index
    {
        array_push($serverInfoClean, $serverInfo[i]);
        echo $i . ' ' . $serverInfo[i] . '&lt;br/&gt;'; // Debug
    }
}
</code></pre>

<p>The debug line is there so I can see in my browser which values it returns. It returns the first character in the string every single time.</p>
