Posted by zac.carey on 07/25/06 16:02
Mike Mike wrote:
> I need to extract NAME from the html below:
>
> <td style="text-align: center; vertical-align: top;">
> <a href="/path/">
> <img
> src="http://domain/images/image.JPG"
> alt="brand NAME product, "
> width="100"
> height="100"
> />
> <br/>
> NAME</a><br/>
> </td>
>
> It can either be from the alt tags where it is surrounded by various words
> (one on each side), or the one between <br/> and </a>.
>
>
> I have tried the following:
> if (preg_match_all('/\[<br\/>.*\](.*)\[\<\/a>.*\]/', $table, $matches)) {
> echo($matches);
> } else {
> print "The pattern did not match anything";
> }
> echo $table;
>
> But I'm not getting anything from it.
> Could it be because of the line break after <br/> or am I doing something
> else wrong?
>
> Regards
> Mike
what's <br/> ?
[Back to original message]
|