php中逻辑运算符,字符串运算符

来源:互联网 发布:个人不能注册域名吗 编辑:程序博客网 时间:2024/05/18 03:58

1,亦或 $a xor $b;

2,字符串运算符

<body><?php$txt1 = "你好,";$txt2 = "欢迎进入PHP的世界!";$txt3 = "编程者吗,";// 使用连接运算符连接两个字符串echo $txt1.$txt2."<br/>";//使用连接赋值运算符连接并赋值$txt3 .= $txt2;echo $txt3;?></body>

3,流程控制语句

PHP对if、while、for、foreach、switch、提供了一套流程替代语法,是把“{”变成“:”,把“}”变为whdif,endwhile,endfor,endforeach以及endswitch。