在php中单击表行时弹出数据库中的图像

I have a table with field "Photo",This field consists of many image names in my database. On clicking any row of my table, I need these images to appear in a popup.

This is my table:

<table id="tab">
    <tr>
        <th>Name</th><th>Address</th><th>Photo</th>
    </tr>
    <tr>
        <td>Roy</td><td>US</td><td>selfie1.jpg,selfie2.jpg</td>
    </tr>
    <tr>
        <td>Elina</td><td>LA</td><td>selfie3.jpg,selfie4.jpg</td>
    </tr>
    <tr>
        <td>Table row3</td>
    </tr>
</table>

How can I do this ? Please help me. Thanks in advance.

</div>