how to extract data from a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tokunbo
Forum Commoner
Posts: 46
Joined: Thu Sep 29, 2011 8:53 am

how to extract data from a file

Post by Tokunbo »

hello sirs,

this is what I would like to do:

I have a filename.extension which I would like to extract some data from. I need to delete the first couple of lines and the last couple of lines - all jargon data, but the info I need to extract is encapsulated between these quoted texts "<start>" and "<stop>".

So Im trying to figure out a way to code such that I say: delete everything before "<start>" and everything after "<stop>" and then save the file as new filename.abc

regards
toks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: how to extract data from a file

Post by requinix »

Do you have an example? There might be an easier way.
Post Reply