$var =39;
echo settype($var,"string");运行结果怎么会是1 ,求详解
echo settype($var,"string");运行结果怎么会是1 ,求详解
解决方案 »
- 求助mysql_fetch_array(): supplied argument is not a valid MySQL result resource
- wordpress主题小毛病
- 师兄师姐帮帮忙啊!!!
- smarty里foreach的索引问题
- PHP 求ajax长轮询示例
- php调用c++服务的问题
- 如何用php编写一个网页版的excel,可在线编辑。求源码
- PHP 传值的问题
- php thinkphp 下载文件问题
- 懂的老哥看下这代码有啥问题,感恩,用户可以把不是自已ID的钱转给别人 50F
- 用<VirtualHost192.. 站点为什么不能指定php路径?
- 我想架个博客,大家推荐下~
(PHP 3, PHP 4 )settype -- Set the type of a variable
Description
bool settype ( mixed var, string type)
Set the type of variable var to type. Possibles values of type are:
"boolean" (or, since PHP 4.2.0, "bool") "integer" (or, since PHP 4.2.0, "int") "float" (only possible since PHP 4.2.0, for older versions use the deprecated variant "double") "string" "array" "object" "null" (since PHP 4.2.0)
如果成功则返回 TRUE,失败则返回 FALSE。
echo settype($var,"string"); // 1 表示成功var_dump($var); //string(2) "39"