format time in php when results are from a loop
===

I have an event agenda set up to populate from a database, echoing rows from a loop. 

I see how to format to get the time that I want: date("g:i a") BUT I can't seem to make it work within my php code. 

I'm having the loop print the data to a $row, and then specifying which piece of data like this:

        <td>' .$row['start_time'] . '</td>

In which start_time is the column in my database that is the datetime piece of data. 

I've tried a few different ways of adding in the formatting for the date time, but none of them have successfully returned results. How do I format this code so it will show up? Do I make it a function or can I add it to the line I have here? 

I'd like to just return the time (not the date), and have it be something like 7:00am. 

Thank you!