I am using this to display image from directory, my problem is that when the $ListingID = 05-250, I get 05-2501, 05-2502 etcc......., I want it to be an exact match, how do I do that.
$dir = 'images';
$dp = dir($dir);
while (($file = $dp->read()) !== false) {
if (strpos($file, $ListingID) === 0) {
echo "<a href=\"javascript:changeImage('images/$file')\"><img src=\"images/$file\" width='78' height='50' border='0'></a> ";
}
Thanks in advance for any help.