I have a few divs
<div class="appname">Name 1</div>
<div class="appname">Name 2</div>
<div class="appname">Name 3</div>
I use DOM and getElementsByClassName('appname')
to parse it using PHP. I want to print out all the names, but can't find anything that works. Already tried:
$linksname = $domname->getElementsByClassName('appname');
foreach ($linksname as $apptitle) {
echo $apptitle->nodeValue;
}
Nothing is working. Any help?
EDIT: just to clear up: the issue is not on how I am parsing the data using DOM. I purposely didn't include that part