很简单的php处理字符串的问题
如题
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><mark style="color:transparent">来4源gaodaimacom搞#代%码*网</mark><code>搞代gaodaima码</code>$string = ''//想要直接获取“”里面的所有字符有什么简便的方法啊 请各位大牛赐教谢谢
——解决方案——————–
- PHP code
preg_match_all('/]*)>/',$string,$ar);print_r($ar[1]);
------解决方案--------------------
$string = '';
$sar='//i';
preg_match_all($sar,$string,$arr);
print_r($arr[1]);