I'm trying to get the caption inside <a />
tag.
For example: <a href="test.php">Nice</a>
will output Nice
.
I'm using Symfony DomCrawler.
This is what I tried:
$crawler = Goutte::request('GET', 'somelink');
$crawler->filter('a')->each(function ($node) use (&$links, &$platforms, &$limit, &$titles, &$startIndex) {
echo 'HTML: ' .$node->text(); //Shows nothing
echo '<br />';
echo 'LINK:' .$node->link()->getUri(); //Shows the link
echo '<hr />';
});
I also tried $node->html();
but no luck. the caption wont show.
Couldn't find anything about it in the API aswell.
Any ideas?