www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] 2D array and html table

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    8

    resolved [RESOLVED] 2D array and html table

    Hi,

    I have converted a recordset into a string of text where each field is separated by a ',' and each record separated by a '|'

    The format of the data string is similar to:
    name, date, duty| Jim, Mon, Office | Jim, Tue, Office | Jim, Wed, Holiday | Jim, Thu, Meeting | Jim, Fri, Meeting | Sue, Mon, Office | Sue, Tue, Meeting | Sue, Wed, Holiday | Sue, Thu, Holiday | Sue, Fri, Holiday | etc.

    The array is therefore something like:
    Array[0][0] name
    Array[0][1] date
    Array[0][2] duty
    Array[1][0] Jim
    Array[1][1] Mon
    Array[1][2] Office
    Array[2][0] Jim
    Array[2][1] Tue
    Array[2][2] Office
    etc.

    etc.

    My question is...
    How can I rearrange this data in a HTML table so it looks something like the example below?

    name, Mon, Tue, Wed, Thu, Fri
    Jim, Office, Office, Holiday, Meeting, Meeting
    Sue, Office, Meeting, Holiday, Holiday, Holiday
    etc.

    I have very little knowledge of Javascript, so if anyone is able and willing to help, could you please explain your answer as thoroughly as possible or at least point me in the right direction to research my answer from other resources.

    Many thanks,
    Gary
    Last edited by Low Society; 11-17-2011 at 08:18 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles