On Monday 05 March 2001 23:09, you wrote:
> I need some help with a program, I need to get every
> instance of text between <a href =””> GET TEXT HERE
> </a> and save the results in a variable. Does anyone
> have some example code of how to do it along with how
> to put the results into just one variable?

Hmm, try
preg_match_all ('/<a\s+href[^>]+>([^<]+)<\/a>/', $Subject, $Matches);

$Matches [0] [1],
$Matches [1] [1],
$Matches [2] [1]
etc

will contain the text afterwards.


-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks

--
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