elentz Posted February 22, 2008 Share Posted February 22, 2008 I have a text file that will always have the same format. It is like this: Station Message Detailed Recording 20:56:29 02-21-2008 TYP EXT# TRUNK DIALED DIGITS START ELAPSED COST ACCOUNT CODE IN 1011 94002 14:44 00:00:26 $00.00 NET 1001 P6011 1101 14:47 00:00:07 $00.00 NET 1001 P6011 1105 14:47 00:01:00 $00.00 IN 1000 94001 14:48 00:00:31 $00.00 The first two lines I need to manipulate. I need to get the date (end of first line)in a variable and then strip the rest of the first two lines out. Then I need to insert each line into different fields into a MySql table. I know enough that I know I need to open the file and read it. But how do I do the manipulating? Thanks for any suggestions. Link to comment https://forums.phpfreaks.com/topic/92465-need-some-guidance/ Share on other sites More sharing options...
drisate Posted February 22, 2008 Share Posted February 22, 2008 You should trim() the files then explode() the spaces Link to comment https://forums.phpfreaks.com/topic/92465-need-some-guidance/#findComment-473722 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.