PHP字符串函数

  


1


 str 美元;=,addslashes (“Shanghai  is ,“最大”,city 拷贝中国。');
  回波(str); 

在向数据库执行插入之前,执行这个函数会在双引号的字符串上加上转义的反斜杠,这样数据库就会正确的插入。

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

7 strtok (),

 string 美元;=,“Hello 世界只Beautiful  day 今天。”;
  $ token =, strtok(字符串,美元,",");
  
  while  (token 美元;!==,假)
  {
  echo “token<美元;br>”;
  $ token =, strtok (", ");
  }


 echo  str_replace(“世界”、“上海”、“Hello 世界!”);


PHP字符串函数