dreamwest Posted May 21, 2009 Share Posted May 21, 2009 Im trying to see if a file has a certain name part $file = "video-of-something.mpg"; if ($file has "video"){ echo "file has video in the name"; } I just need to check if the $file has "video" in the string Link to comment https://forums.phpfreaks.com/topic/159184-str-contains/ Share on other sites More sharing options...
MasterACE14 Posted May 21, 2009 Share Posted May 21, 2009 $file = "video-of-something.mpg"; if(strpos($file,"video")) { echo "file has video in the name"; } Link to comment https://forums.phpfreaks.com/topic/159184-str-contains/#findComment-839512 Share on other sites More sharing options...
dreamwest Posted May 22, 2009 Author Share Posted May 22, 2009 Thanks Link to comment https://forums.phpfreaks.com/topic/159184-str-contains/#findComment-839516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.