Hi,
what if title and href is reverse? And what if i want to extract three oder four different attributes- Do I need to add every possible order or is it possible to search for something without knowing the order?""
examples:
<a href="LINK" title="TITLE" target="_BLANK">TEXT</a>
<a title="TITLE" href="LINK" target="_BLANK">TEXT</a>
etc.
I'd like to have something like that:
'#<a(?: ([a-z]{2,}).*=.*["\'](.*)["\'])?>(.*)</a>#Usi'
that results:
array(
0 => array(
0 => array('href', 'title', 'target'),
1 => array('title', 'href', 'target'),
)
1 => array(
0 => array('LINK', 'TITLE', '_BLANK'),
1 => array('TITLE', 'LINK', '_BLANK'),
)
2 => 'TEXT',
)
Or do I need to use two preg_match()'s to deal with it?
Honda Forum