$str = '主要有以下几个文件:index.php, style.css, common.js';
$pattern = '/(\w+)*\.(php|css|js)*/i';
$replace = '<em>$1.$2</em>';
echo preg_replace($pattern, $replace, $str);
$pattern = '/(\w+)*\.(php|css|js)*/i';
$replace = '<em>$1.$2</em>';
echo preg_replace($pattern, $replace, $str);
2016-06-25
Array
(
[0] => 52224296
[1] => 李白
[2] => 18
[3] => 高三一班
[4] => 0
[5] => 2016-06-02 18:43:09
)
(
[0] => 52224296
[1] => 李白
[2] => 18
[3] => 高三一班
[4] => 0
[5] => 2016-06-02 18:43:09
)
2016-06-24