Bonjour a tous,
Je cherche a retrouver dans "<img height="40" width="98" border="0" alt="bouton rubrique sport : infos, pratiques, histoire, règles" src="http://www.kutchuk.com/images/boutons/sport.gif" "
tous les attributs dans $1 et toutes les valeurs dans $2.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
	$s_str = '<img height="40" width="98" border="0" alt="bouton rubrique sport : infos, pratiques, histoire, règles" src="http://www.kutchuk.com/images/boutons/sport.gif" >';
	preg_match_all('#<img (?:(.+)=(.+))+>#', $s_str, $a_array);
	print "<pre>";print_r($a_array);print "</pre>";
Bien sur, sa fonctionne mal... ca paraissait trop simple.