I have string that contains area map and some other info:
$string = 'something here
<map name="map">
< area shape="circle" coords="34,210,3" alt="something 1" href="test.php?place=aaa&time=1" />
< area shape="circle" coords="34,220,3" alt="something2" href="test.php?place=bbb&time=2" />
< area shape="circle" coords="669,229,3" alt="some 8" href="test.php?place=bbb&time=3" />
</map>';
How can I get coordinates, place and time extracted from string for each area?
Try this out, I used regex to extract the variables into an array. You can see the results with the var_dump.
var_dump() results
You would access the information in the above example by array/key: