Delo_img Posted May 17, 2021 Share Posted May 17, 2021 Hi, I need some help, im trying to extract data from a file and display results as text. Example. File: TitanicRomance1990.jpg Output: Movie Name: Titanic Year : 1990 Thank you in Advanced. Quote Link to comment https://forums.phpfreaks.com/topic/312719-php-get-data-from-file-name/ Share on other sites More sharing options...
requinix Posted May 18, 2021 Share Posted May 18, 2021 Are you even sure there was a "Titanic" movie in 1990? Quote Link to comment https://forums.phpfreaks.com/topic/312719-php-get-data-from-file-name/#findComment-1586621 Share on other sites More sharing options...
Delo_img Posted May 19, 2021 Author Share Posted May 19, 2021 On 5/17/2021 at 6:29 PM, requinix said: Are you even sure there was a "Titanic" movie in 1990? That was just a quick example lol Quote Link to comment https://forums.phpfreaks.com/topic/312719-php-get-data-from-file-name/#findComment-1586637 Share on other sites More sharing options...
requinix Posted May 19, 2021 Share Posted May 19, 2021 If the filename is title + genre + year then you're going to have to identify each piece. The genre will either have to be a single word (so you know the last "word" in the filename was the genre) or one from a specific list, the year is obviously the numbers at the end, and the title would be everything else. Quote Link to comment https://forums.phpfreaks.com/topic/312719-php-get-data-from-file-name/#findComment-1586639 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.