Home  >  Article  >  Backend Development  >  昨天在做数据库批量导入的时候遇到的老有关问题(foreach+&有关问题)

昨天在做数据库批量导入的时候遇到的老有关问题(foreach+&有关问题)

WBOY
WBOYOriginal
2016-06-13 12:37:22784browse

昨天在做数据库批量导入的时候遇到的老问题(foreach+&问题)
问题可以简要的概括为:

$arr = array(1,2,3,4,5);<br />
foreach($arr as $key => &$row) {}<br />
foreach($arr as $key => $row) {}<br />
var_dump($arr);

array (size=5)<br />
  0 => int 1<br />
  1 => int 2<br />
  2 => int 3<br />
  3 => int 4<br />
  4 => &int 4

foreach 指针问题,指针大神,求现身!

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