i want to find all occurrence of a string: "coords"" within another, but i only can found the first and the last
( stripos() and strripos() )
<body>
<img src="page.jpg" border="0" usemap="#fghf" />
<map name="fghf" id="fghf">
<area shape="rect" coords="10,71,258,236" href="#" alt="some_alt" title="some_title" />
<area shape="rect" coords="258,72,506,237" href="#" alt="some_alt" title="some_title" />
<area shape="rect" coords="155,79,150,200" href="#" alt="some_alt" title="some_title" />
<area shape="rect" coords="88,22,400,217" href="#" alt="some_alt" title="some_title" />
</map>
</body>
i have manage to extract one of them:
//get coords
$pos = strpos($file,"coords=\"");
$tmpfile = substr($file,$pos+8);
list($tmpfile) = split(" ",$tmpfile);
$tmpfile_len = strlen($tmpfile);
$coords = substr($tmpfile,0,$tmpfile_len-1);
but, how can i loop on all the strings:"coords" ?