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!
Hello all,
my program goal is to get info from text files and store it in db (mysql)
my input (the text file) is build like an xml file with tags.
a lot of line which looks like that.
<tagName name="parameterName" value="value" status="status" bla bla>
I need to write a script that will go line by line and first identify that the line is relevant (looks like I wrote)
then I have to get only the parameterName the value and the status (for storing).
So once I read the line I need to isolate this three elements.
I know how to open the file and read from it but can get the infromation I want. which functions can help me?
I hope the Q is understood
Thanks
Well, this isn't really a tough one. You just need to familiarize yourself with the php manual. Perhaps a little stristr and regex in there and you should be fine. Don't forget to also check out the file function if all of these entries are on their own line.