I looked at the WeChat payment document demo and converted the array into xml data
But when I print var_dump() or echo it all turns into numbers.
Does anyone know how to deal with it?
Data before conversion
After conversion, it becomes a number....
Right click->View source code, the browser parses the xml tag as an html tag
Or specify the document type as XML
You need to add a header tag when printing xml,
This is an object. Do you want to insert the parameters of the object into xml? ? ?
But I see that your code directly traverses the object and assigns it directly into xml...
Should you convert the object into data first