How to get part of a string?
<p>I have a string:</p>

<pre><code>$s = '&lt;div data-x="0" data-y="0"&gt;Some text asdasdas&lt;/div&gt;
&lt;div data-x="0" data-y="-1000"&gt;Some text...&lt;/div&gt;
&lt;div data-x="0" data-y="-2000"&gt;Some text foobar&lt;/div&gt;
&lt;div data-x="500" data-y="-3000"&gt;Some t..&lt;/div&gt;';
</code></pre>

<p>The string can be different. Divs can include classes and etc.</p>

<p>How to get value from <strong>data-x</strong> and <strong>data-y</strong> of each Div?
Like:</p>

<pre><code>$x1 = 0; $y1 = 0;
$x2 = 0; $y2 = -1000;
$x3 = 0; $y3 = -2000;
$x4 = 500; $y4 = -4000;
</code></pre>

<p>I would like to explode the string into an array, but then I don't know what to do ..</p>
