J
|
Jane 3/3/2008 |
Hi, $path_to_file = "include/errors.xml"; $myFile = new XMLParser($path_to_file); $size = sizeof($myFile->data[0]['child'])-1; for ($i=0; $i<=$size; $i++) { $keywords = $myFile->data[0]['child'][$i]['child'][1]['content']; $keys = split(" ",$keywords); for ($j=0; $j<sizeof($keys)-1; $j++) $pos[$j] = strpos(strtoupper($errstr), strtoupper($keys[$j])); $nullfound=false; foreach($pos as $val) if($val===false) { $nullfound=true; break; } if(!$nullfound) { $solution = $myFile->data[0]['child'][$i]['child'][5]['content']; } }
|