Jump to content

Layout


Connor1994

Recommended Posts

Hi all, posted previously about how to go around getting something like this:

72uas4.jpg

Never really got a strong response, Nabeel suggested something like:

<table>
 <tr>
       <td>flight num</td>
       ...
       <td>deprt city</td>
       <?php
       // We are gonna loop each day of the week
       for($dayofweek = 0; $dayofweek < 7; $dayofweek++)
       {
               // echo our column opening
               echo '<td>';

               // Check if $i (the current day of week) exists
               if(substr_count($schedule->daysofweek, $dayofweek) > 0)
               { 
                       // there is a flight for sunday , so echo that plane icon out
                       echo 'plane icon';
               }

               // Close that column
               echo '</td>';

       }
       ?>
       <td>arrival time</td>
       ...
 </tr>
</table>

I am not the best at coding, could someone please give me some sort of instructions ?

I would like it to look like the picture although not exact as it looks like I would be asking for too much then :P

Link to comment
Share on other sites

  • Administrators

I did this for jet2virtual.org when it was in operation. It is a bit cumbersome and could be refined but serves the purpose. You will have to change the image links.

http://pastebin.com/Ka5MEtaZ

It will produce something like this -> http://www.simpilotgroup.com/skins/index.php/Schedules

Be sure to have the skin set to jet2org.....

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

Look at the code I had posted... that's the basic starting point for that

Thanks Nabeel, i was keen to get some developed code as i have a very limited knowledge with developing tables, i can edit, move things around and thats about it, im not sure where to start with your code, if you could help nudge me in the right direction along the way that'd be great, and id learn alot out of it as well.

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...