<?php

$array = array('step one', 'step two', 'step three', 'step four');

// by default, the pointer is on the first element
echo current($array) . "<br />"n"; // "step one"

// skip two steps
echo next($array)."<BR />";
echo reset($array);
?>

 

 

reset -- 将数组的内部指针指向第一个单元

详见list() ,each(),[next()对应pre()][next(),each()会导致指针后移]

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-22
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-02-22
  • 2021-06-24
  • 2022-01-30
相关资源
相似解决方案