HTML
<article class="movie-summary" data-slug="slug-goes-here" data-title="This is a Title">
...
...
</article>
PHP
$html = file_get_html( 'example.com' );
foreach( $html->find('article') as $data) {
$property = 'data-title';
echo $data->$property;
}
Hey all, so I want to be able to get all data-title from all articles off a particular site. When I use data-slug I get data back yet when I use data-title I get nothing, with the help of this post