I'm trying to display some images inside php.
<?php
$sql1 = "
SELECT data1.id
, data1.profileid
, data1.Employer
, CONCAT('[',GROUP_CONCAT(data2.Url),']') Url
FROM database1 data1
LEFT
JOIN database2 data2
ON data1.id = data2.employerid
WHERE data1.profileid = '$session'
GROUP
BY data1.id
, data1.profileid
, data1.Employer";
$resultEmployer = mysqli_query($db, $sql1) or die;
if (mysqli_num_rows($resultEmployer) > 0)
{
while($row = mysqli_fetch_assoc($resultEmployer))
{
$employer .= "" . $row['Employer'] . "";
$employer .= "" . $row['Url'] . "";
}
}
?>
The output from the database inside php is:
Jake ['https://example.com/jake1.jpg,https://example.com/jake2.jpg,https://example.com/jake3.jpg']
Stephanie ['https://example.com/stephanie1.jpg,https://example.com/stephanie2.jpg,https://example.com/stephanie3.jpg']
I don't know how to put these links (from the CONCAT in MYSQL) inside an img-tag to display the images and not the url(s) itself. I tried this without success:
<?php
$employer .= "<img src=" . $row['Url'] . "";
?>
Who can help me? Thank you.
</div>