]*>#', $html, $tags); for($i = 0; $i < count($tags); $i++) { foreach($tags[$i] as $tag) { if(!strstr($tag,'input')) continue; $tag = preg_replace(array('#^<#','#>$#'),'',$tag); preg_match_all('/(\w+)((\s*=\s*".*?")|(\s*=\s*\'.*?\')|(\s*=\s*\w+)|())/s', $tag, $matches, PREG_PATTERN_ORDER); if(count($matches[3]) > 1) { print_r($matches[3]); } } } ?>