Спасибо за советы.
Уточняю!
Программа:
<?php
include('simple_html_dom.php');
$html = file_get_html('http://domen.ru/');
$all = $html->find('div[class=old]');
for ($i = 0; $i <= count($all); $i++)
{
echo $all[$i]." ";
}
?>
Примерный результат (часть):
<div class="p" >
<h2 title="t1" >
<a class="t2" href="/old/12345/" >Example1</a>
</h2>
</div>
...
<div class="p" >
<h2 title="t1" >
<a class="t2" href="/old/56789/" >Example1</a>
</h2>
</div>
...
<div class="p" >
<h2 title="t1" >
<a class="t2" href="/old/654321/" >Example3</a>
</h2>
</div>
...
Мне надо добавить
http://domen.ru к href=" , чтобы на выходе было:
<div class="p" >
<h2 title="t1" >
<a class="t2" href="http://domen.ru/old/12345/" >Example1</a>
</h2>
</div>
...
<div class="p" >
<h2 title="t1" >
<a class="t2" href="http://domen.ru/old/56789/" >Example1</a>
</h2>
</div>
...
<div class="p" >
<h2 title="t1" >
<a class="t2" href="http://domen.ru/old/654321/" >Example3</a>
</h2>
</div>