<h3></h3>
<dl class="data">
<dt class="name">Поле1</dt>
<dd class="value">Поле1_1</dd>
<dt class="name">Поле2</dt>
<dd class="value">Поле2_2</dd>
</dl>
$array = array(
array(
"name" => "Поле1",
"value" => "Поле1_1",
),
array(
"name" => "Поле2",
"value" => "Поле2_2",
)
);
$source = '<h3></h3>
<dl class="data">
<dt class="name">Поле1</dt>
<dd class="value">Поле1_1</dd>
<dt class="name">Поле2</dt>
<dd class="value">Поле2_2</dd>
</dl>';
$matches = [];
preg_match_all('/class="name">(.+?)<.*?class="value">(.+?)</su', $source, $matches, PREG_SET_ORDER);
$result = array_map(
function (array $item): array {
return ['name' => $item[1], 'value' => $item[2]];
},
$matches
);