0
Array([promo_code] => Array
        (
            [0] => promo_code is required
        )

    [first_name] => Array
        (
            [0] => first name is required
        )

    [last_name] => Array
        (
            [0] => last name is required
        )

    [address] => Array
        (
            [0] => address is required
        )

    [city] => Array
        (
            [0] => city is required
        )
);

我有上面的数组,我想将其显示为

 <?xml version=1.0?>
 <Result>
 <promo_code>promo_code is required</promo_code>
 <last_name>last_name is required</last_name>
 <address>address is required</address>
 <city>city is required</city>
 </Result>

请指导先谢谢

4

1 回答 1

0

利用SimpleXMLElement类。你什么都没试过,如果你有的话,这里会有一些代码。

于 2013-09-30T15:13:27.497 回答