Whenever I loop through my MySQL Database, it only goes through anything underneath the user it's on.

I've already tried messing with the $row variable and the loop, but nothing is working.

$conn = new mysqli($host, $dbUsername, $dbPassword, $dbName);

$query = "SELECT * FROM logindata";

$response = @mysqli_query($conn, $query);

$players = array();
$coins = array();

if ($response) {
    while ($row = mysqli_fetch_array($response)) {
        array_push($players, $row['Username']);
        array_push($coins, $row['Coins']);

I want it to loop through every row in my database.

Any help?

0 Answers