Help needed with Logic! Please!!!

Results 1 to 2 of 2

Thread: Help needed with Logic! Please!!!

  1. #1
    Join Date
    Dec 1969

    Default Help needed with Logic! Please!!!

    This is a small project with the Wage calculator.<BR>I have the first form which asks the user to put in required days that he wants his wage to be calculated.If the user says 2 then i need to display the already exsisting table in another page for two days... accordingly the table from "sunday" to "Saturday" lengthens or shortens according to the days input...can you help me with hints as to how I can go about?<BR>Here is the example link which I need to do!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help needed with Logic! Please!!!

    So, if I understand you right, if the requirement is to display 2 days, you want to display 2 rows in the table and if you need to display 5 days, you would have 5 rows in the table. <BR><BR>Here&#039;s one way you can do it:<BR><BR>Fistly, create an array so you can enumerate through all the values to be displayed in each of the rows. (A few calculations that I&#039;m sure you can work out).<BR><BR>Then you need to start your table and then loop through for as many rows as you wish, eg.<BR><BR>&#060;table&#062;<BR>&#060;% for rows=0 to noOfDays-1 %&#062;<BR>&#060;tr&#062;&#060;td&#062; &#060;%= arrayContainingValuesToDisplay(rows) %&#062; &#060;/td&#062;&#060;/tr&#062;<BR>&#060;% next %&#062;<BR>&#060;/table&#062;<BR><BR>With a little playing around, you should be able to customise this for your prob, with no prob.<BR><BR>HTH,<BR>Pete.

Posting Permissions

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