Jump to content

hieK

New Members
  • Posts

    3
  • Joined

  • Last visited

hieK's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So now i have another problem, <ul class="listType1 marginTop1"> <li itemprop="ingredients">13/4 pahar faina de naut</li> <li itemprop="ingredients">3/4 lingurita de sare</li> <li itemprop="ingredients">3/4 lingurita cardamon macinat marunt</li> <li itemprop="ingredients">1/2 lingurita piper negru macinat</li> <li itemprop="ingredients">11/2 pahare de apa</li> <li itemprop="ingredients">4 linguri ulei de masline</li> </ul> i cant figure out how to write the xpath query $ingredientsQuery = $xpath->query("//ul[@class=listType1 marginTop1]/text()"); but how do i integrate the li ?
  2. I`ve figured it out, it was because of the list, so i had to use node->nodeValue and worked
  3. so i am trying to make my api for a website, and started coding a script for it. so far it looks like this the problem is that when i try to echo it it wont give me the title ( only an error on line 17, that is the last line ) if it helps you when i try to execute print_r it gives me DOMNodeList Object ( ) Sorry for my bad english, its not my native language index.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.