下一篇 » « 上一篇

split

作者:semirock    时间:2008-08-24    来源:http://444p.com    点击:480    本文共1篇文章 字体:[ ]

split

<HTML>
<HEAD>
<TITLE>split</TITLE>
</HEAD>
<BODY>
<?
$paragraph = "This is a short paragraph. Each ";
$paragraph .= "sentence will be extracted by ";
$paragraph .= "the split function. As a ";
$paragraph .= "result, you will be amazed!";

$sentence = split("[\.\!\?]", $paragraph, 5);

for($index = 0; $index < count($sentence); $index++)
{
print("$index. $sentence[$index] <BR>\n");
}
?>
</BODY>
</HTML>
发表评论
密码: (游客不需要密码)
记住我【Alt+S 或 Ctrl+Enter 快速提交】

搜索工具


《PHP函数》点击排行