<?php
//在这里设置name的session值为jobs
session_start();
$_SESSION['name']= 'jobs';
echo $_SESSION['name'];
//在这里设置name的session值为jobs
session_start();
$_SESSION['name']= 'jobs';
echo $_SESSION['name'];
2016-08-09
<?php
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
$arr=explode(" ",$subject);
$arr1=$arr[3];
$i=preg_match("/([a-z]+)@([a-z]+)(\.com){1}/",$subject,$matches);
echo $matches[0];
不喜欢它的那种写法
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
$arr=explode(" ",$subject);
$arr1=$arr[3];
$i=preg_match("/([a-z]+)@([a-z]+)(\.com){1}/",$subject,$matches);
echo $matches[0];
不喜欢它的那种写法
2016-08-09
$re = "/(\w+\.\w+)/";
$replace = "<em>$1$2$3</em>";
echo preg_replace($re, $replace, $str);
$replace = "<em>$1$2$3</em>";
echo preg_replace($re, $replace, $str);
2016-08-09