Home  >  Article  >  Backend Development  >  PHP数组变量重复利用的Bug

PHP数组变量重复利用的Bug

WBOY
WBOYOriginal
2016-06-23 13:16:191013browse

一,有问题的代码

for($i = 1;$i    <br>   <p></p> 二,有问题的代码输出   <p></p>   <p><br></p>   <p><br></p>   <p></p> 三,正确的代码使用数组前,最好先定义初始化。   <br>   <p></p>   <p><br></p>   <p></p>   <pre name="code" class="sycode">for($i = 1;$i    <br>   <p></p> 四,正确的代码输出   <p></p>   <p><br></p>   
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