<?php $data = '<?xml version="1.0" encoding="utf-8" ?> <note> <to> <form>pswA</form> <heading>A</heading> </to> <to> <form>pswB</form> <heading>A</heading> </to> </note>'; $xml = simplexml_load_string($data); foreach ($xml->to as $to){ if ($to->form == 'pswA' && $to->heading == 'A'){echo "allow";} elseif ($to->form == 'pswA' && $to->heading == 'B'){echo "notallow";} elseif ($to->form == 'pswA' && $to->heading == 'C'){echo "block";} } foreach ($xml->to as $to){ if ($to->form == 'pswC' && $to->heading == 'A'){echo "allow";} elseif ($to->form == 'pswC' && $to->heading == 'B'){echo "notallow";} elseif ($to->form == 'pswC' && $to->heading == 'C'){echo "block";} } ?>
You have javascript disabled. You will not be able to edit any code.