Here is my string.
$list = '
<div id="list">
<div class="item">foo: bar</div>
<div class="item">name: value</div>
<div class="item">color: red</div>
<div class="item">count: 1</div>
</div>
';
How is the best way to get data from this html and add to PHP array? I would like receive:
$items = array('foo' => 'bar', 'name' => 'value', 'color' => 'red', 'count' => 1);