php基础教程字符.docx
- 文档编号:11777824
- 上传时间:2023-06-02
- 格式:DOCX
- 页数:29
- 大小:17.93KB
php基础教程字符.docx
《php基础教程字符.docx》由会员分享,可在线阅读,更多相关《php基础教程字符.docx(29页珍藏版)》请在冰点文库上搜索。
php基础教程字符
php基础教程-字符
一获取字符串的长度
index.php:
phpecho$PHP_SELF;? >">
php
if($_POST[str]!
="")
{
$str=$_POST[str];
echo"
}
?
>
二字符串大小写转换
index.php:
php$PHP_SELF? >"> php if($_POST[submit1]! ="") { $str=$_POST[str]; echo$str."全部转换为大写字母为".strtoupper($_POST[str]); } if($_POST[submit2]! ="") { $str=$_POST[str]; echo$str."全部转换为写字母为".strtolower($_POST[str]); } ? > 三字符串首尾空格处理 index.php: DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN" "http: //www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> //www.w3.org/1999/xhtml">
字符串首尾空格处理|
--
.STYLE1{
color:
#FF0000;
font-weight:
bold;
}
-->
phpecho$PHP_SELF;? >">