i have image search directory and i use filename to be title.
example, if image filename is: foo-bar.jpg so the title is: "Foo Bar".
now, how if i got random filename like xkd345724dADGgxSDgSdgadD.jpg and so the title will be "xkd345724dADGgxSDgSdgadD", and replace it to "Foo Bar".
some php code like this?
$searchimg = "Foo Bar";
$filename = "xkd345724dADGgxSDgSdgadD.jpg";
if $filename == random {
$title = str_replace (randomtext, $searchimg, $filename);
}else{
$title = $filename;
}
thanks in advance.