Hello Guys,
I need help on this problem.
output:
display images for the values that exist in the table:
input:
the values in a table's column where they're in the format of "0,0" and the image corresponding to it is named 0,0.png
this is my attempt $q is retrieving "0,0" however in order for me to retrieve its image i need to add ".png" to it in order to find it in the directory that the image is located. It tried without ".png" and it also doesn't work.
$q = 'SELECT ID FROM table';
$dirname = "directory/";
$images = glob($dirname.$q.".png");
foreach($images as $image) {
echo '<img src="'.$image.'" /><br />';