Home > Backend Development > PHP Tutorial > javascript中的toString()方法,在php中有什么一样的函数吗?解决办法

javascript中的toString()方法,在php中有什么一样的函数吗?解决办法

WBOY
Release: 2016-06-13 10:24:12
Original
1103 people have browsed it

javascript中的toString()方法,在php中有什么一样的函数吗?
javascript中的toString()方法,在php中有什么一样的函数吗?

------解决方案--------------------
(string)
------解决方案--------------------
strval()
------解决方案--------------------
方法有多种。

PHP code
 $cha = 36;      var_dump($cha); //int(36) $a="$cha"; var_dump($a);   //string(2) "36" $b=(string)$a; var_dump($b);  //string(2) "36"...................<div class="clear">
                 
              
              
        
            </div>
Copy after login
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template