php_note.txt

drop procedure if exists pro_reg;
delimiter //
create procedure pro_reg(in user varchar(20),in password varchar(20) ); 
begin 
insert into tb_adm (userword,password)values(user,password);
end
//
1) trim('   \"string\"', '\"sg');   // 最终输出:\"strin
2) trim('   \"string\"   ', '\"sg');   // 最终输出:\"string\"
3)trim('\"string\"', '\"sg');    // 最终输出:trin
<?php 
$str = " 使用函数trim去掉字符串两端空白字符 "; 
$str1 = trim($str); 
echo "处理前有".strlen($str)."个字符"; echo "<br/>"; 
//www.phpjc.cn echo "<br/>"; 
echo "使用trim函数处理后有".strlen($str1)."个字符"; 
?> 
<?php 
$str = "##使用函数trim去掉字符串两端特定字符####"; 
$str1 = trim($str,"#"); 
//为函数trim传入第二个参数,
trim将删除字符串$str两端的#字符 echo $str."<br>"; 
echo $str1; 
?> 
http://127.0.0.1/myworks/zzforum/post.php?type=%27post%27#revert
posted @ 2016-05-07 10:56  夜深人静123  阅读(150)  评论(0编辑  收藏  举报