// objected oriented method
<?php
$con=new mysqli("localhost","root","","dbname");
$sql="select * from tbl";
$res=$con->query($sql);
$while($fetch=$res->fetch_object(){
echo $fetch->uid;
echo $fetch->uname;
echo $fetch->unumber;
}
?>