I was wondering if there was an easier method of comparing two substrings on two separate lines. I am retrieving data from a database, in which I "join" 6 pieces of data of a record with a ":", and push it into an array. Once all data has been extracted, I return the joined-string array to main. The main function, "splits" the data into it's individual strings. How do I, after splitting the data, compare 3 of the 6 pieces of data with the same 3 strings of the next element in the array.