????//???php????mysql
????// ??? mysqli ??? ???? ?????
????// ??????????????????У???php.ini ??extension=php_mysqli.dll
????// phpinfo();
????//1.?????????.
????$link = @mysqli_connect('localhost'??'root'??'root');
????// var_dump($link);
????//2.?ж??????????
????if(!$link){
????echo mysqli_connect_errno();//?????
????echo mysqli_connect_error();//???????
????exit;//????????б???
????}
????//3.???
????$res = mysqli_select_db($link??'t4');
????// var_dump($res);
????//4.?????????
????$ress = mysqli_set_charset($link??'utf8');
????// var_dump($ress);
????//5.???sql???
????$sql = 'select * from t4';
????//6.????sql???MySQL??????
????$result = mysqli_query($link??$sql);//???? boolean/object(???????)
????var_dump($result);
????//7.????????
????/*
????$row = mysqli_fetch_assoc($result); // ?????????е????????????
????$row = mysqli_fetch_assoc($result); // ?????????е?????
????$row = mysqli_fetch_assoc($result); // ?????????е?????
????$row = mysqli_fetch_assoc($result); // ?????????е?????
????$row = mysqli_fetch_assoc($result); // ?????????е?????
????var_dump($row);
????echo '<pre>';
????print_r($row);
????echo '</pre>';
????*/
????// ???????????????????е?????
????$userlist = [];
????while(    $row = mysqli_fetch_assoc($result)    ){
????$userlist[] = $row;
????}
????echo '<pre>';
????print_r($userlist);
????echo '</pre>';
????//8.??????
????mysqli_free_result($result);
????// 9.???????
????$res = mysqli_close( $link );
????var_dump($res);
????// ???????????????????????????????????