XML parsing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi All and Happy New Year!

Here is my array $specialties:
Array ( [0] => aa [1] => bb [2] => cc [3] => dd [4] => ee)

Here is my XML array: $sp = $job->getElementsByTagName('Specialty');

foreach($sp as $specialty){

echo "MATCH ".strtolower($specialty->firstChild->nodeValue)."<br>";
echo "NO MATCH ".strtolower($specialty->firstChild->nodeValue)."<br>";

my in_array only matches in the first foreach loop. For example is
$specialty is aa and bb it will only match aa "MATCH aa" and "NO MATCH
bb". If $specialty is bb and aa it matches bb but not aa.
Any idea what's happening here?

PS how can I convert child->nodeValue to a string? I keep getting an
error "Object of class DOMElement could not be converted to string"


Site Timeline