<?php
$host='192.168.1.78';
$user='root';
$pwd='mil';
$db='test';
$tableName='student';
$con=mysqli_connect($host,$user,$pwd,$db);
echo '<pre>';
mysqli_query($con,'set names "utf8"');
$res=mysqli_query($con,'select * from '.$tableName);
while($result=mysqli_fetch_assoc($res)){
var_dump($result);
}
<?php
$username = 'root';
$password = 'michael';
$databaseName = 'laratest';
$con = mysqli_connect('localhost', $username, $password, $databaseName);
mysqli_query($con,'set names "utf8"');
echo "<pre>";
$res = mysqli_query($con, 'SELECT migration,batch FROM migrations');
$aField = [];
echo mysqli_error($con);
while ($tmp = mysqli_fetch_row($res)) {
$aField[] = $tmp;
}
var_dump($aField);