#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Matrix Table format


    Hello Everyone
    actually I want to show table which end on particular row number and starts on second column in next column as want to create seating arrangement for exam PHP page using MySQL table please guide me
    awaiting for your valuable reply
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2005
    Location
    Vancouver, WA, USA
    Posts
    396
    Rep Power
    189
    Show some code of what you are trying, and you will get more guidance.
    Thomas Tremain
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,690
    Rep Power
    6351
    PHP Code:
    $seatsPerRow 30;
    $totalSeats 300;

    echo 
    "<table border=1 cellpadding=3><tr>";
    for ( 
    $p 1$p <= $totalSeats$p++ )
    {
      echo 
    "<td>X</td>";
      if ( 
    $p $seatsPerRow == ) {
        echo 
    "</tr><td>";
      }
    }
    echo 
    "</tr></table>"
    Untested.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo