php if-else not working
<p>I'm trying to retrieve values from a table, put them in PHP variables and then subject them to an if-else control structure. However, it's going to the <code>else</code> part regardless of the data.</p>

<p>Here's the code:</p>

<pre><code>while($row = mysql_fetch_array($sql))
{
    $name = $row["name"];
    $uid = $row["userid"];
    $ufeed = $row["feed"];
    $feeddate = $row["feeddate"];
    $type = $row["type"];

    if($type == "file")
    {
        $feeds .= 'some random stuff';
    }
    else
    {
        $feeds = 'some other random stuff';
    }
}
</code></pre>
