PHP 在PHP中输出斑马条纹行

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP 在PHP中输出斑马条纹行相关的知识,希望对你有一定的参考价值。

<?php // PHP version
  $i = 0;
  // have_rows_to_output is a stand-in for your loop's code
  while (have_rows_to_output) {
    if (fmod($i, 2) == 0) { // it's an even number
      output_even_style_row;
    } else { // it's an odd number
      output_odd_style_row;
    }
    $i++;
  }
?>

以上是关于PHP 在PHP中输出斑马条纹行的主要内容,如果未能解决你的问题,请参考以下文章