BR
asked on
php simplexml_load_string function
Dear Experts,
the below code, it works perfectly fine,
however it doesn't work, altough it is the same data.
I don't understand why it is not working. what do you suggest I should do?
the below code, it works perfectly fine,
$xmlDATA = '<?xml version="1.0" encoding="utf-8"?><VposResponse><MerchantId>000000000125427</MerchantId><TransactionType>Sale</TransactionType></VposResponse>';
$xml = simplexml_load_string($xmlDATA);
echo $MerchantId = $xml->MerchantId;
echo "<br><br>";
echo $TransactionType = $xml->TransactionType;
however it doesn't work, altough it is the same data.
$xmlDATA = htmlentities($_POST["BankResponse"]);
$xml = simplexml_load_string($xmlDATA);
echo "MerchantId :" . $MerchantId = $xml->MerchantId;
echo "<br><br>";
echo "TransactionType :" . $TransactionType = $xml->TransactionType;
I don't understand why it is not working. what do you suggest I should do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER