# XML Parser Basic Newbie question

**URL:** <https://forum.kirupa.com/t/xml-parser-basic-newbie-question/284692>\
**Category:** Uncategorized\
**Created:** [March 22, 2009, 2:10pm UTC](https://forum.kirupa.com/t/xml-parser-basic-newbie-question/284692 "2009-03-22T14:10:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clive](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@clive](https://forum.kirupa.com/u/clive)\
**Post date:** [March 22, 2009, 2:10pm UTC](https://forum.kirupa.com/t/xml-parser-basic-newbie-question/284692/1 "2009-03-22T14:10:53Z")

</div>

Hi  
I’m trying to parse an xml fed and extract some data to display in a form.  
I found an excellent tutorial here which extracts the data ai need and places it in a varial $data  
[http://www.kirupa.com/web/xml\_php\_parse\_beginner.htm](http://www.kirupa.com/web/xml_php_parse_beginner.htm)  
I’ve got this to work at [http://www.bookbargains4u.com/xml\_beginner.php](http://www.bookbargains4u.com/xml_beginner.php)

I can’t figure out how to extract the the individual lines from $ data eg. I’d like to be able to to put the book title in a form variable.  
I asume I eill need some sort of substr command to do this but I’m struck  
Can anyone help please?

TIA  
Clive
