📅  最后修改于: 2022-03-11 14:54:27.835000             🧑  作者: Mango
mysqli_fetch_array()'s 1st parameter must be a result of a query. What you are doing is you are passing the connection (which doesn't make sense) and the query command itself.
To fix this, execute the query first, then store the result to a variable then later fetch that variable.
$sql = "select * from privinsi";
$result = mysqli_query($connection,$sql);
while($r = mysqli_fetch_array($result))
{
// your code here
}