mamoosh Posted March 20, 2008 Share Posted March 20, 2008 Hi everyone! Can someone show me how to add png and gif formats to this code? <?php if(!is_dir($file) && strpos($file, '.jpg')>0) { ?> I tried this, but failed: <?php if(!is_dir($file) && strpos($file, '.jpg' || '.png' || '.gif')>0) { ?> Thank you Link to comment https://forums.phpfreaks.com/topic/97027-strposfile-jpg/ Share on other sites More sharing options...
Jeremysr Posted March 20, 2008 Share Posted March 20, 2008 <?php if(!is_dir($file) && (strpos($file, '.jpg')>0 || strpos($file, '.png')>0 || strpos($file, '.gif')>0)) { ?> Link to comment https://forums.phpfreaks.com/topic/97027-strposfile-jpg/#findComment-496531 Share on other sites More sharing options...
mamoosh Posted March 20, 2008 Author Share Posted March 20, 2008 Awesome. Thank you very much. Link to comment https://forums.phpfreaks.com/topic/97027-strposfile-jpg/#findComment-496538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.