XML; $xml=simplexml_load_string($note); echo $xml->to , ""; echo $xml->from , ""; echo $xml->heading , ""; echo $xml->body;