$username = $row[username];
will work if username is a constant or a string key (the php manual says using this for string keys is deprecated and WRONG.)
$username = $row['username'];
this is just the same as
$username = $row["username"];
You can insert variables into strings quoted with double quotes such as
$username = $row["username$i"];
where you cannot with single-quotes. however
$username = $row['username' . $i];
is equivalent.
Code convention typically uses the form
$username = $row['username'];