while ($array = mysqli_fetch_array($result)) {
if (mysqli_num_rows($result) >= 1) {
while ($array = mysqli_fetch_array($result)) {
if (mysqli_num_rows($user_result) == 1) {
...
}
}
}
}