php Cannot use object of type mysqli_result as array code example
Example: Uncaught Error: Cannot use object of type mysqli_result as array
$query = "SELECT 1";
$result = $mysqli->query($query);
$followingdata = $result->fetch_assoc()
$query = "SELECT 1";
$result = $mysqli->query($query);
$followingdata = $result->fetch_assoc()