Hello, I've used arrays in the past, but I've used them in a different way. I used to use them to replace strings that I want, but now I want to print arrays. My problem is below.
I would like to change the [0], [1], [2], [3], .etc to an actual name. So [0] being something like [id], [1] being [username], .etc.

Is there a way to make this.
px1.png

Turn into this.
px2.png

Here is my PHP code.

Code:
<?php
$mysqli = new mysqli("localhost", "username", "password", "database");
if($mysqli->connect_errno) {
	echo "Error";
}

$id = $_GET['id'];

$result = $mysqli->query("SELECT * FROM users WHERE id = 'id'");

$accounts = array();

while(($row =  $result->fetch_array(MYSQLI_BOTH))) {
    $accounts[] = $row['id'];
    $accounts[] = $row['username'];
    $accounts[] = $row['country'];
    $accounts[] = $row['gender'];
}
?>
<pre>
<?php
print_r($accounts);
?>
</pre>