Why doesn't my PHP foreach work?
<pre><code>$start = true;
$new = "";
foreach($array as $val)
{
    if($start = true &amp;&amp; $val != " ")
    {
        $start = false;
        $new .= strtoupper($val);
    }
    elseif($val == " ")
    {
        $new .= " ";
        $start = true;
    }
    else
    {
        $new .= strtolower($val);
    }
    $start = false;
}
</code></pre>

<p>Basically what happens is <code>$start</code> NEVER becomes <code>false</code> AND everything becomes capitalized. So it looks like the first <code>if</code> IS running, but for some reason NEVER SETS <code>$start</code> to <code>false</code>. </p>
