thank you in advance for any assistance...
i have 100's of .txt files. Each file contains some data that i would like to put into a database. an example of a txt file would be something like this (smith.txt):
//
Forward Jean Smith
Current Team: Hawks
First Year Played: 1990
Last Drafted: 09/02/2004
Up for Draft again: 2006
Background Information
Gender: Male
Family: Wife: Lynda Smith
2 Children: Kyle, Brett.
Birth date: 12/12/1970
Birthplace: New Haven, CT
Home City: Ft. Lauderdale, FL
Religion: Methodist
Education:
MBA, Yale University, 1995
BA, Yale University, 1992.
i would want to separate some of the useful data into variables for entry into a mysql database. I am assuming i would use the file() function. I guess my question is once i do that, what is the best way to set some variables from that array, for instance i would want data such as:
$current_team = "hawks"
$gender = "male"
$religion = "methodist"
$education = "MBA, Yale University, 1995 \n BA, History, Yale University, 1992."
notice the \n (newline) break in the last variable