I need to display an <img>
element in a Bootgrid data table. I'm getting the data from the response into PHP as follows:
$name = $key->name;
$region = $key->region->name;
$flag = $key->region->flagUrl;
Then I loop through it to create the table.
This works:
<tr>
<td><?php echo $name ?></td>
<td><?php echo $region ?></td>
<td><?php echo $flag ?></td>
<!-- DISPLAYS THE URL STRING -->
</tr>
This doesn't work:
<tr>
<td><?php echo $name ?></td>
<td><?php echo $region ?></td>
<td><img src="<?php echo $flag ?>" alt="<?php echo $region ?>" ></td>
<!-- DISPLAYS EMPTY TD -->
</tr>
Any way I can make the image display?
Thank you.