<?php $printable = '<TR class=" light "> Stuff in here </TR>'; if(preg_match_all('/<TR[^>]*>(.*?)<\/TR>/msU', $printable, $matches)) { foreach($matches[1] as $match) { echo("$match <br />"); } } ?>