Problem with preg_match_all

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hackerman
Forum Newbie
Posts: 3
Joined: Thu Aug 23, 2007 3:08 pm

Problem with preg_match_all

Post by hackerman »

I'm a PHP programmer few years, but I sill have problems with regular expression functions.

Code: Select all

 
$k = preg_match_all('@(<div class="thumbpart"><img src=")(.*)(" id=")(.*)(" /></div>)@msU', $file, $matches);
 
It returns me that HTML code, but there is more atributes than I indicated. I want just src and id atributes, but it returns alt, title etc. too.
Post Reply