I have two tables one is image and another one is tags.
image_id=primary key(IMAGE TABLE),fk_image_id=foreign key(TAGS TABLE).
Expected output: if example tagname two, image one to display single image and tagname (more names).
But now I get suppose two tagname, get two image separate ..how to solve this?
I using implode
function but its coming " invalid arguments passed".
include_once("config.php");
$result=mysqli_query($mysqli,"SELECT * FROM image,tags WHERE image_id=fk_image_id ORDER BY creation_dt DESC LIMIT 5 ");
while($res = mysqli_fetch_array($result)) {
$tagname=$res['tag_txt'];
echo $tagname;
echo "<tr>"."<img src='http://localhost:8080/memes/".$res['path_txt']."' width='380' height='280' style='padding: 10px;' />"."</tr>";
}