foreach($files as $file){
if(preg_match($regex, $file, $out))
{
$result[] = "Found: {$out[1]} in {$file}";
}
}
echo count($result) ? implode("<br>", $result) : "Not Found";
if(file_exists("../images/$imgid.png")){echo'<img src ="../images/'.$imgid.'.png" alt="" class="img" /><br>';
const TOMATO = 'tomato';
const CARROT = 'carrot';
const APPLE = 'apple';
const POTATO = 'potato';
$basket = [
TOMATO => 15,
POTATO => 10,
CARROT => 5,
APPLE => 16,
];
$salad = [
TOMATO => 3,
POTATO => 2,
CARROT => 1,
];