未定义索引:first_name
$view = $user->VIEW_EMP($connect);
if (is_array($view)) {
foreach($view as $key => $value){
echo $view['first_name'];
}
}
功能:
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;
}