0

Hu Guys,

Sorry, my question might sound silly but how can I embbed a class inside

  echo "<tr><td><img src='data:image/jpeg;base64," . base64_encode($row['product_img']) . "' alt='' /></td></tr>";      

I tried

 echo '<div class="img"><tr><td><img src='data:image/jpeg;base64," . base64_encode($row['product_img']) . "' alt='' /></div></td></tr>';

But it's not working. Looks like I am doing something now quite right

Edited by london-G

3
Contributors
3
Replies
11
Views
2 Years
Discussion Span
Last Post by london-G
1

Hi! In addition to Dave's suggestion, having a div between rows is not really correct:

<table>
    <tr>
        <td>

    <div class="img">
        <tr>
            <td><img src="..." />
    </div>

    <tr>
        <td>
</table>

Do:

<table>
    <tr>
        <td>

    <tr>
        <td><div class="img"><img src="..." /></div>

    <tr>
        <td>
</table>

Or simply:

<table>
    <tr>
        <td>

    <tr>
        <td><img class="img" src="..." />

    <tr>
        <td>
</table>

If necessary. Otherwise you can append the class to the td tag.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.