$pics) { if (substr($pics,-4,4) == ".gif" or substr($pics,-4,4) == ".jpg" or substr($pics,-4,4) == ".JPG") { echo " "; } } ?>