<!--?php /** * Created by PhpStorm. * User: ADKi * Date: 2016/4/26 0026 * Time: 12:19 */ class ArrayToXML { public function toXml($data){ $xml = '<xml-->'; foreach ($data as $key => $value){ if (is_numeric($value)){ $xml .= "<".$key.">".$value."<!--".$key."-->"; }else{ $xml .= "<".$key."><!--[CDATA[".$value."]]--><!--".$key."-->"; } } $xml .= ''; return $xml; } }
PHP微信公众号自动发送红包API(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/7aa93f2c110f7a13312e8eafca3aa054.html