- PHP
-
2006-09-29 - 更新:2012-12-20
この記事は最終更新日から1年以上経過しています。
内部配列ポインタを進める
例)
if(条件文) break; //ループを抜ける next($array); //次のレコードへ
<?php $transport = array('one', 'two', 'three', 'four'); $mode = current($transport); // $mode = 'one'; $mode = next($transport); // $mode = 'two'; $mode = next($transport); // $mode = 'three'; $mode = prev($transport); // $mode = 'two'; $mode = end($transport); // $mode = 'four'; ?>
この記事がお役に立ちましたらシェアお願いします

1,363 views