Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $txt = "<?xml version='1.0' encoding='utf-8'?>
- <transactions_response>
- <data>
- <trx>
- <msisdn/>
- <product_type>GAME</product_type>
- <management_code>838873402</management_code>
- <voucher_code>QV9TP-B0UIF-VGU3O-1G0Z1-S3PT7</voucher_code>
- <serial_number>6113420739</serial_number>
- <voucher_password/>
- <pin/>
- </trx>
- </data>
- </transactions_response>";
- $xml_res = simplexml_load_string($txt) or die("Format Salah");
- echo "<br><pre>";
- print_r($xml_res);
- $xml_res = (array)$xml_res;
- $xml_res = (array)$xml_res['data']->trx;
- print_r($xml_res['voucher_code']);
- print_r($xml_res['voucher_password']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement