How do i compare a string to a list of strings in PHP?
问题 Basically i have two files with strings in them separated with a new line. What i wish to do is get the first string from the first file and compare it to ALL of the strings from the second file. Then get the second string from the first file and compare it to ALL of the strings in the second file then get the third and etc etc. Currently i have this piece of code, but i am not sure if it is working as i wish it to be $file = file_get_contents("file1.txt"); $pieces = explode("\n", trim($file)