I have 'simple' problem :-)
I'm reading large XML file using this:
$node = new SimpleXMLElement($reader->readOuterXML());
$node have elements severity, class... I can compare them like this:
if($node->severity==WARNING){
Or show them like this:
echo $node->severity;
What I want to prepare if statements in advance reading posts variables like this:
if(isset($_POST['Severity']) && !EMPTY($_POST['Severity'])){
$Severity[]=$_POST['Severity'];
foreach($Severity as $Severityval){
foreach($Severityval as $Severityvalues){
$searchquery .= '($node->Severity==' .$Severityvalues. ') || ';
}
}
}
Then I want to use $searchquery inside XML reader:
if($searchquery){
echo $node->severity;
}
But, this always return true and everything is shown :-(
My variable is properly created, if I echo it shows ($node->Severity==WARNING)
Maybe screen shot can explain my problem:
Thanks in advance
