Home >Backend Development >PHP Tutorial >php字符串转换有关问题

php字符串转换有关问题

WBOY
WBOYOriginal
2016-06-13 10:18:34741browse

php字符串转换问题
$num="";
for($i=0;$i $num .= dechex(rand(0,15));
}


以上代码,dechex(rand(0,15)),应该得到的是数字?但是却$num .  
这怎么理解。。

------解决方案--------------------
dechex的返回值是一个字符串呀

Statement:
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