Kasuke_Akira Posted March 23, 2007 Share Posted March 23, 2007 I have a big huge question here. I've been having trouble how to get everything to work together. I have two textareas: main, side I need to take the information from main and side which will always look like this in its general format: 4 Shock 3 Disenchant etc.... I need to check main and side (independantly within their ownselves) for any duplicate entries such as: 4 Shock 2 Shock Then I need to compare main and side to be sure if there are duplicate entries, they dont add up to more than 4. The thing with all this is, each textarea is being arrayed by using: $main_split = explode("\n", $main); which results in: $main_split[0] = "4Shock" then each set pulled out is being furthered arrayed as such: $main_card_split = explode("\n", $main_split[$i], 3); which results in: $main_card_split[0] = "4" | $main_card_split[1] = "Shock" I'm using while statements to achieve this already. I just need to be able to take the words and compare within each textbox to make sure there are no duplicates, then compare the main and side to check that if there are duplicates, their corresponding numeric values only add up to 4. Link to comment https://forums.phpfreaks.com/topic/44059-parsing-stuff/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.