QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1004|回复: 1

PHP 取2个字符中间的,请问咋写?

[复制链接]
发表于 2004-11-14 16:54:18 | 显示全部楼层 |阅读模式
我的list文件是这样的
(*[email protected]/)
end
(*[email protected]/)
end
(*[email protected]/)
end
(*[email protected]/)
end
(*[email protected]/)
end

end if



我想只把每段的邮件地址取出来
请问我该咋写代码?
发表于 2004-11-14 16:59:39 | 显示全部楼层
这个函数应该对你有用:

explode
切开字串。

语法: array explode(string separator, string string);

传回值: 阵列

函式种类: 资料处理

内容说明

本函式将字串依指定的字串或字元 separator 切开。将切开后的字串传回到阵列变数中。

使用范例
<?
$pizza = "第一片 第二片 第三片 第四片 第五片 第六片";
$pieces = explode(" ", $pizza);
?>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-5-10 23:48 , Processed in 0.100858 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表