# Show only "x" lines of dynamically loaded html

**URL:** <https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100>\
**Category:** flash\
**Created:** [March 23, 2006, 8:22pm UTC](https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100 "2006-03-23T20:22:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![esa1234](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@esa1234](https://forum.kirupa.com/u/esa1234)\
**Post date:** [March 23, 2006, 8:22pm UTC](https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100/1 "2006-03-23T20:22:49Z")

</div>

hello,  
I’ve succesfully made a few flash websites, nothign special, with help from the kind folks here at kirupa, and now I am in need once again.

I’m trying to use actionscript to load an external html file with css, but I only want a certain number of lines from the html file to be shown. The html file consists of events, but I only want to show current events on one particular page. I thought it might be possible to have actionscript read only the lines from…say…“Current Events” to “Past Evenets.” I hope that makes sense.

Another thought might be to use xml to do what I’m looking for, but either way, I’m at a loss for how to achieve my goal. Does anyone have any suggestions?

cheers,  
e.s.a.

---

<div class="post-metadata">

**Author:** ![azwebdesigns](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@azwebdesigns](https://forum.kirupa.com/u/azwebdesigns)\
**Post date:** [March 24, 2006, 12:29am UTC](https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100/2 "2006-03-24T00:29:33Z")

</div>

The short answer is no, you really can’t make it only read certain lines. You should just redesign the text files to only contain what needs to be loaded and displayed.

---

<div class="post-metadata">

**Author:** ![esa1234](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@esa1234](https://forum.kirupa.com/u/esa1234)\
**Post date:** [March 24, 2006, 1:52am UTC](https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100/3 "2006-03-24T01:52:07Z")

</div>

there has to be a way, whether it be through AS, php, xml, sql, etc…I’ve seen it done. [myspace.com](http://myspace.com) is able to do this quite well, but I don’t really know what they’re using to make their design with…php I’d guess…but I’m not sure.

please help!:cubs:

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [March 24, 2006, 2:01am UTC](https://forum.kirupa.com/t/show-only-x-lines-of-dynamically-loaded-html/183100/4 "2006-03-24T02:01:18Z")

</div>

They probably don’t use PHP.

In PHP, you could use the file(); method, then simply loop through the ones you wanted:

```php
$contents = file('filename.html');
for ($i=12; $i<15; $i++) {
    echo $contents[$i]."
";
}

```
