$succ = "2"; } else { if ($member == '3') { $succ = "3"; } else { if ($member == '4') { $succ = "4"; } else { if ($member == '5') { $succ = "5"; } } } } } } if ($fromAdmin != '') { $fromAdmin = $fromAdmin; } else { $fromAdmin = ''; } $parseObj = new xmlparser('UTF-8'); $xmlcontent = '<?xml version="1.0" ?><list>'; $xmlcontent .= '<succ>1</succ>'; $xmlcontent .= '<fname>' . $fname . '</fname>'; $xmlcontent .= '<fromadmin>' . $fromAdmin . '</fromadmin>'; $xmlcontent .= '</list>'; $arr_xml = $parseObj->xml2php($xmlcontent); $xml = $parseObj->php2xml($arr_xml); $parseObj->output_xml($xml); exit;