The mysqli_fetch_assoc() function is a crucial tool that turns a row from your database into a PHP
array, where the keys are the names of your columns. This means you do not have to guess where the data is; you
simply call it by its name.
Why is this even important? When working on larger projects, database tables change frequently. If you used numerical indexes ($row[0]), your code would break when a new column is added. With associative fetching, your code remains safe and readable.
This function is most commonly found inside a while loop. Why? Because with each call, the function
"grabs" one row and moves the invisible pointer to the next. When there are no more rows left, the function returns
null, and the loop safely stops.
$row[3], you use $row["lastname"].mysqli_fetch_array() because it does not
create duplicate indexes.