Home >Backend Development >PHP Tutorial >怎么样在for循化外获取循环内的值呢?

怎么样在for循化外获取循环内的值呢?

WBOY
WBOYOriginal
2016-06-20 12:26:291519browse

$array = array(a,b,c,d);$arrl=count($array);for($i=0;$i<$arrl;$i++){		$str=$array[$i].",";}


如何在for循环外获取一个变名值为 a,b,c,d的字符串值呢?


回复讨论(解决方案)

第6行 $str .= $array[$i].",";

第6行 $str .= $array[$i].",";


谢谢,解决了!
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