<?php $html = <<<HTML <p>Some content <a href="www.test.com">A link</a></p> HTML; var_export(preg_split('~\s+|(<[^>]+>)~', $html, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE));
You have javascript disabled. You will not be able to edit any code.