dewey_witt Posted April 12, 2009 Share Posted April 12, 2009 OK may be an amateur question.... I haven't done it before so don't know if you can. I Have e a .txt. document with data in it as such: Slither BB when you play this card, take an extra turn after this one I would like to take this data and break it down into sections and enter it into a database like This: Field 1: Slither Field 2: BB Field 3: when you play this card take and extra turn after this one. A. Is it possible? and B. If so how ya do it? Please show me 'ol great ones... Quote Link to comment Share on other sites More sharing options...
.josh Posted April 12, 2009 Share Posted April 12, 2009 $string = "Slither BB when you play this card, take an extra turn after this one"; preg_match('~^([^\s]*)\s([^\s]*)\s(.*)~',$string,$matches); echo "<pre>"; print_r($matches); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.