Home > php教程 > php手册 > php的list()的一步操作给一组变量进行赋值的使用

php的list()的一步操作给一组变量进行赋值的使用

WBOY
Release: 2016-06-06 20:37:07
Original
921 people have browsed it

我们在切割字符串可能会把切出来的数组一个一个付给每个变量,很麻烦的,我们可以用list()函数来完成

例如:
list($a,$b) = explode(" ",microtime());
echo $a.'------'.$b;
?>
结果:0.60937700-----1305625768

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