Sabbir345's avatar

How to XML data convert to php object

{ "Request": " < ? x m l version='1.0' encoding='UTF-8 ' ? > < ResponseStatus> < ApiAccessUserId>test< /ApiAccessUserId> < AuthenticationKey>test< /AuthenticationKey> < TransactionId>101010< /TransactionId>2019-10-13 18:00:00< /TranDateTime>1200< /RefTranNo> < RefTranDateTime>2019-10-14 14:42:47604 604.69< /PayAmount> A02< /PayMode>02026 Account Payment Successfull< /StatusMsg>N< /ScrollNo>0.10< /Vat> 0.59< /Commission>200< /TransactionStatus> < /ResponseStatus>" }

0 likes
3 replies
Sabbir345's avatar

@bobbybouwmann I already try it not working

error : simplexml_load_string() expects parameter 1 to be string, array given

bobbybouwmann's avatar

Well, look at the error... Your data is an array and not a string. Also looking at your data it looks more like XML in JSON...

Can you show your code for this?

Please or to participate in this conversation.