Variable becomes NULL in IF statement
<pre><code>while ($row = mysql_fetch_array($results)) {
    $results_array[$row['post_id']] = $row;   

    $arr = array($row[2] =&gt; $row[3]); 

    $location = trim($arr[cp_check_where_to_show_video]);
    $video    = trim($arr[cp_embed_video]);

    echo $video;

    if($location=='Video of the Day')
    { 
        echo $location."\n";
        echo "---";
        echo $video; 
        echo "---";  
    } 
}

Output:
    Video Text
    Video of the Day
    -------
    NULL
</code></pre>

<p>Here's the thing. Suppose I have the code above, the 'videos' were derived from the database. So far, i'm having no problem with my queries until I added the if statement.<br/><br/>
The first echo outputs the expected results, but inside the if statement "video" becomes NULL. I could get in the if statement and output anything except for the $video.
<br/><br/>
Could someone please tell what went wrong or could possibly be wrong with the statements above? Weird.</p>
