I have this piece of code that retrieves an array from the database and I have to cycle through it to create some html elements, but sometimes the array will come empty (whe