Please view the below code
$xml_string = "<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
<soapenv:Body>
<res:ResultMsg xmlns:res='http://cps.huawei.com/cpsinterface/result'>
<![CDATA[
<?xml version='1.0' encoding='utf-8'?><Result><ResultParameters><ResultParameter><Key>FailedReason</Key><Value>The value 611015125123 of the CNIC parameter is incorrect, failed to authenticate the parameter.</Value></ResultParameter></ResultParameters><ResultCode>2002</ResultCode><ResultType>0</ResultType><OriginatorConversationID>20180904165750</OriginatorConversationID><ResultDesc>Transaction information is invalid.</ResultDesc><TransactionID>000000000000</TransactionID><ConversationID>AG_20180904_00007be9004e56992e5f</ConversationID></Result>]]>
</res:ResultMsg>
</soapenv:Body>
</soapenv:Envelope>";
Then I get the type of Variable
$type=gettype($xml_string);
echo string alright. When I Try to echo the actual Value, it just print out a part of it.
FailedReasonThe value 611015125123 of the CNIC parameter is incorrect, failed to authenticate the parameter.2002020180904165750Transaction information is invalid.000000000000AG_20180904_00007be9004e56992e5f]]>
Why is this strange behavior happening. I tried replacing all the new line characters as well, but it didn't help. Any hints are appreciated.
<textarea></textarea>. Or useCLIto print it out