There is an html document with the following format:
<div....>
<map name="blah"
.
.
/>
<map name="blah2"
.
.
/>
</div>
I want always to retrieve the second map. However, I want to make completely dynamic.
$url = $_GET['url'];
$html_content = getHTML($url);
$html = str_get_html($html_content);
$map = $html->find('map[name=blah2]');
The aforementioned lines are working perfectly fine. But as I mentioned before I don't want to give manually the name. I just want always to take the second map. And moreover I want to retrieve also the name of the map.
Any ideas?
p.s. The code bellow doesn't work. I've tried this before. And doesn't display the content under the map. However, correctly returns the name of the map
$map = $html->find('map',1);