PHP常用字符串函数(二)

简介:这是PHP常用字符串函数(二)的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=324396' scrolling='no'>


<HTML>
<HEAD>
<TITLE>常用字符串函数(二)</TITLE>
</HEAD>
<BODY>
<?
 $text = "My dog's name is Angus.";
 //print Angus
 print(substr($text, 17, 5)."<hr>");//取出子串
?>
<?
 //切开字串
 // create a demo string
 $line = "leon\tatkinson\tleon@clearink.com";

 // loop while there are still tokens
 for($token = strtok($line, "\t");
  $token != "";
  $token = strtok("\t"))
 {
  print("token: $token<BR>\n");
 }
?>
<?
 //传回字串中某字串开始处至结束的字串
 $text = "Although this is string, it's not very long.";
 print("<hr>".strstr($text, ","));
?>
</BODY>
</HTML>



“PHP常用字符串函数(二)”的更多相关文章 》

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/324396.html pageNo:15

posted on 2011-11-19 11:26  圣者  阅读(145)  评论(0编辑  收藏  举报

导航