I have database with users, I want to show results without users that i have id's in array. How should i do it, any ideas?
<?php
include_once "dbh.php";
session_start();
$id = $_SESSION['userId'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$noid = array("8","9","10");
$sql = "SELECT * FROM users WHERE idUsers != '$noid' ORDER BY RAND() LIMIT 1; ";
$result = mysqli_query($conn, $sql);
$resultCheck = mysqli_num_rows($result);
if ($resultCheck> 0){
$row = mysqli_fetch_assoc($result);
echo $row['nick'];
}
?>
</body>
</html>