This project is read-only.

Row index Reset

Jun 7, 2013 at 2:49 PM
Edited Jun 7, 2013 at 2:54 PM
When you tab to a new page, this reset the count on first row and then continue with the normal count

like show in this image:

so in the second page in the first row start in 0 but the second row continue normally the count

I need the count rate usually when jumping a following page, how I can know if the document to jump from one page to the next? or some help for these issues

my code:
 $PHPWord = new PHPWord();
    $res = $system->getOrderByCostumer($_POST["start"], $_POST["end"]);
    $section = $PHPWord->createSection();
    $table = $section->addTable();
    $array = $function->getArrayDoc($res);

    for ($index = 0; $index < count($array); $index) {

        for ($c = 1; $c <= 4; $c++, $index++) {

            $table->addCell(1750)->addText(isset($array[$index]) ? $index : '');

    header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8');
    header("Content-Disposition: attachment;filename='" . $dateNow . ".docx'");
    header('Cache-Control: max-age=0');
    $objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');