本文整理汇总了PHP中Students::get_names方法的典型用法代码示例。如果您正苦于以下问题:PHP Students::get_names方法的具体用法?PHP Students::get_names怎么用?PHP Students::get_names使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Students
的用法示例。
在下文中一共展示了Students::get_names方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Students
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/initconfig.php';
include_once 'dal/students.php';
$objStudent = new Students();
$student_data = $objStudent->get_names();
$student_name_col = array();
while ($fetch_data = mysqli_fetch_array($student_data)) {
$student_name_col[] = array('key' => $fetch_data['student_id'], 'value' => $fetch_data['name']);
}
$student_col_json = json_encode($student_name_col);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Jquery Auto Completion</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">