Control what is going to be exibited on screen

From: Date: Wed, 05 Feb 2003 18:21:54 +0000
Subject: Control what is going to be exibited on screen
Groups: php.general 
Request: Send a blank email to php-general+get-134442@lists.php.net to get a copy of this message
Ok, guys this is it With th code bellow I can get the html file from a url and get the content without the html tags, but I wanna control the exibition of this content and only display the lines 1 to 4, and I can't seem to get how to do this. I thank any advice you can get me. Rodrigo // Get a file into an array. In this example we'll go through HTTP to get // the HTML source of a URL. $lines = file ('http://www.site.com'); // Loop through our array, show html source as html source; and line numbers too. foreach ($lines as $line_num => $line) { $notags = "Line #<b>{$line_num}</b> : " . strip_tags($line) . "<br>\n"; echo $notags; }

« previous php.general (#134442) next »