从MySQL调用时,PHP会跳过6行

If you go to the Staff Page at http://www.cebyrd.com/staff.php and scroll using the carButton, the scroll function fetches 12 lines from the database instead of 6. So 6 teachers (3 rows and 2 columns) get skipped with every scroll. I don’t know why it’s skipping a page. Here’s my code:

<section id="content" class="bg_white">
<div class="container_12">
  <div class="wrapper">
    <article class="grid_12">
      <div class="indent">
        <h2 class="ind">C. E. Byrd Staff</h2>
        <div class="box-carousel-2"> <a href="#" class="car-button1 prev-2"  data-type="prevPage"></a> <a href="#" class="car-button1 next-2" data-type="nextPage"></a>
          <div class="carousel-2">
            <ul id="mycarousel2" class="jcarousel-skin-tango">
<?php
$row_ctr = 0;
$open_LI = false;

while($row = $res->fetch_assoc()) {
  $row_ctr++;

      if($row_ctr % 3 == 1) {
    $open_LI = true;
?>
              <li>
<?php     } ?>

Thanks so much for your help. It is greatly appreciated!!!

From what i can get when you fetch an array from a resource in database you will always get twice the number of columns this is because the array that is returned in from the resource file could be mapped to the column title as well as numeric digits 0,1,2 .. etc.
A good example here will be suppose i have a database with columns test1 and test2 then i can call the data at test1 either using $row['test1'] or $row[0] and similarly for test2 i CAN either call using $row['test2'] or $row[1]
Hopefully this helps you out

Are you referring to the < and > buttons at the top right of the page? These buttons control the JQuery carousel script, not your PHP code. The teachers are already loaded into the page, and these buttons just scroll the data to the left and right.

I've only had a quick look, but I think you can fix the over-scrolling issue by changing the value of pageStep in this file. It's currently set to 3. Try changing this value to 1 or 2.