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

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

WBOY
Release: 2016-06-20 12:26:29
Original
1526 people have browsed it

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


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


回复讨论(解决方案)

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

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


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