Home > php教程 > php手册 > php数据类型01

php数据类型01

WBOY
Release: 2016-06-06 19:57:57
Original
1533 people have browsed it

1.数据类型: 标量类型:整型(int),浮点型(float),字符串型(string),布尔型(boolean) 符合类型:数组(array),对象(object) 其他类型:资源(resource),NULL 2.$a = 123; echo 11$a; //$a能打出来 echo 11$a11; //$a打不出,php默认$a11是一

1.数据类型:

        标量类型:整型(int),浮点型(float),字符串型(string),布尔型(boolean)

        符合类型:数组(array),对象(object)

        其他类型:资源(resource),NULL

 

2.$a = "123";

       echo "11$a";           //$a能打出来

       echo "11$a11" ;      //$a打不出,php默认$a11是一个变量,解决方法如下:

       echo "11{$a}11";      //php只解析大括号里的变量

3.结尾定界符前不能有任何东西,要顶行写

             $a =

           
                  
                
                           

123

               
           
xxx;                   //要顶行写
echo $a;

4.为false的布尔类型:

    FALSE , 0 , 0.0 ,  空字符串 ,字符串为0 ,NULL ,空数组

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template