My code currently puts only the first row into the $collection variable, and it echoes everything correctly for that first row. But, I need every row to print to the page. I've found mysqli_fetch_all, and when I do a var_dump, I get all of the rows. However, my while loop breaks and I get "undefined index" errors for "name" and "collection" in my $html variable line.

The first two only return the last row, and the last one doesn't work (I think the MySqlResult may have depreciated. I tried mysqli_result in its place, but it didn't work either).

I'm not sure what piece of the puzzle I'm missing.

If I were to use mysqli_fetch_all, how could I get all of the information for each item? Is there a better way to do this? Maybe I could pass the fetch_all array ID in the $html variable as well, but I'm not sure how I would do that either.