laimas,
Вот вывожу два раза, правильно так будет?
<?php
include_once('simple_html_dom.php');
if (isset($_POST['sub']) ) {
// Create DOM from URL or file
$html = file_get_html($_POST ['link']);
// Find all images
foreach($html->find('div[class=clearfix] h1') as $element)
echo $element->plaintext . '<br>';
// Find all images
foreach($html->find('a[class=username]') as $element)
echo $element->plaintext . '<br>';
}
?>