# \[PHP - XML - Parsing\] Displaying only top 5 lines

**URL:** <https://forum.kirupa.com/t/php-xml-parsing-displaying-only-top-5-lines/141757>\
**Category:** Uncategorized\
**Created:** [March 22, 2005, 9:38pm UTC](https://forum.kirupa.com/t/php-xml-parsing-displaying-only-top-5-lines/141757 "2005-03-22T21:38:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveMania](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DaveMania](https://forum.kirupa.com/u/DaveMania)\
**Post date:** [March 22, 2005, 9:38pm UTC](https://forum.kirupa.com/t/php-xml-parsing-displaying-only-top-5-lines/141757/1 "2005-03-22T21:38:00Z")

</div>

There is a tutorial on kirupa that shows you how to get the contents of an XML document and display it. Basically i want this but i want it to only show the top five lines / any lines that i choose say line 1, 2, 3, 6 and 7. You know something like that.  
I’m kindof a noob at this so explanations would be great but if not then i’m sure i’ll figure it out eventually.  
Thanks 🙂

p.s. Hope i’m not being too demanding 😉
