Undefined index php mvc model
<p>Undefined index: first_name </p>

<pre><code>$view = $user-&gt;VIEW_EMP($connect);
    if (is_array($view)) {
        foreach($view as $key =&gt; $value){
            echo $view['first_name'];
        }
    }
</code></pre>

<p>Function:</p>

<pre><code>static function VIEW_EMP($db){
    $sql = "SELECT * from employees LIMIT 0, 30 ";
    if($output = mysql_query($sql)):
            $columns = array();
            while($result = mysql_fetch_assoc($output)):
                $columns[] = $result;
            endwhile;
        endif; 
       return $columns;
    }
</code></pre>
