Reply to Re: preg_match

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация