You should use preg_match_all() for this.
Something like this should do (didn't try it thou):

preg_match_all("|<!--start-->(.*)<!--stop-->\">|U", $lineofhtml,
$output, PREG_PATTERN_ORDER);


Niklas


-----Original Message-----
From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] 
Sent: 11. tammikuuta 2002 5:56
To: php-list
Subject: [PHP] ereg


This is my code :
ereg("<!--start-->(.*)<!--stop-->", $lineofhtml, $output);

The problem is that, with <!--start-->(.*)<!--stop--> it matches
everthing from the first <!--start--> to the last <!--stop-->... hence
it appears its all in one array... what I need to do is tell it to stop
at the first <!--stop--> and I can't figure out how to do that... any
ideas?

Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to