Hi all - Its my first post so please treat me as the ultimate newbie! (Forum, Php AND MySql-wise) ::) I have hunted around for solutions for a while and have become baffled with all the different functions (strstr, substr, preg_match etc) and I am left confused about what direction to head in right from the start. Essentially the backbone of what I want to achieve is a simple text area form field where people can paste in chunks of text ( I have no control over the formatting of the text as its produced by another application ). The text will contain various snippets of information that I would like to read out of the form and ultimately into a mySql db - But for now I just want to work out the reading part. An example of some text to read might be this: Dog --- Legs: 4 Eyes: 2 Weight: 10.00 lbs Age: 11 Hair: Black Habits: Bites Barks Sniffs itself Another example might be: Bird ---- Wings: 2 Eyes: 2 Age: 1 Habits: Targets clean cars As you can see from these two examples the supplied information will vary each time and so I need to produce a flexible text reader that will scan the text for predefined keywords ("Wings:", "Eyes:", "Age:") and record the information ready to add to a db. Important things I need to consider are: The name field has no preceding keyword to trigger off but will always be the first line. Some lines of the text will have more than one set of information to be recorded separately. Some information (Like Habits in the example) would be some kind of list or array of multiple lines. So far I have the form and the script to loop through all the lines but I am unsure how to start splitting up the lines to separate out the keywords and values and which functions to use. There is no easy character that separates the information (except spaces - but spaces are also within the values so I cant use it). Can anyone advise me of how I should try to approach this problem ? ??? Thanks in advance, Steven