Im trying to put each user in an Array . eg. array1 = (bob , humphry , 7 bonn avenue)
array2 = (dylan, gordie , 8 lannister str)
But the first user is being repeated in the second array??
$sql = “SELECT user.userName ,user.userSurname, user.avatar, user.status FROM user”;
if($stmt = $mysqli->prepare($sql)){
$stmt->execute();
$stmt->bind_result($name,$surname,$avatar,$status);
while($stmt->fetch()){
$nameArray[]=($name);
$nameArray[]=($surname);
$nameArray[]=($avatar);
$nameArray[]=($status);
$idArray[] = $nameArray;
}