Home > Backend Development > PHP Tutorial > 问下以下数据PHP如何调用

问下以下数据PHP如何调用

WBOY
Release: 2016-06-13 10:25:29
Original
724 people have browsed it

问下以下数据PHP怎么调用

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->地址1_C>电话1_D>手机1_A>QQ1_F>EMAIL1_S>日期1_DT>时间1_T>
Copy after login


以上是 $data内容 我是用下面的方法弄的  
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->preg_match('/(.*)/', $data, $C1);echo '地址:'.$C1[1].'<br>';preg_match('/(.*)/', $data, $D1);echo '电话:'.$D1[1].'<br>';preg_match('/(.*)/', $data, $A1);echo '手机:'.$A1[1].'<br>';preg_match('/(.*)/', $data, $F1);echo 'QQ:'.$F1[1].'<br>'
Copy after login


但是有没其他更加方便效率更好的办法
比如 用$info['D1'] 可以解析电话的内容 或者其他更好的方法


------解决方案--------------------
PHP code
$arr=preg_split('/]+>/',$data,-1,PREG_SPLIT_NO_EMPTY);print_r($arr);<div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template