I'm trying to call images with their Id row as name, each images as different extensions (jpg, gif, svg...) and I want to take the image with its Id without write the extension every time. I saw I can do it with a GLOB but I don't really know how.
For now, I'm here :
<?php
$ext = array("jpg", "jpeg", "gif", "svg", "png");
foreach($ext as $extension){
if( is_file($row->id. '.' .$extension)){
echo '<img src="'.$row->id. '.' .$extension.'"/>';
}
}
?>