Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    156
    Thanks
    47
    Thanked 0 Times in 0 Posts

    Syntax issue with/increment

    I'm trying to increment the row number but each row has id="1". What am I doing wrong?

    $rowNum = 1;

    @$content .= "<tr class=\"sortable\" id=\"' . ++$rowNum . '\" bgcolor=\"$col\">\n<td>$a1[ItemName]</td><td>$a1[ItemNum]</td><td>$itemprice</td><td align=\"center\"><a href=\"re.php?opt4&id=$a1[ItemID]\" title=\"Remove\">X</a></td></tr>\n";
    Last edited by Daniellez; 03-02-2009 at 10:14 AM.

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    156
    Thanks
    47
    Thanked 0 Times in 0 Posts
    Disregard, this works: id=\"" . ++$rowNum . "\"
    Last edited by Daniellez; 03-02-2009 at 10:17 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •