Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 815401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:40:39+00:00 2026-05-15T01:40:39+00:00

I’m currently working on a project where I need to print out a lesson

  • 0

I’m currently working on a project where I need to print out a lesson timetable. Here is a link to the one I have created http://conorhackett.com/tt/.

It works fine now but i’d like to have more control over it. If you look at the code you’ll see what I mean. The html/css is very messy.

I’ve tried to do it with a html table but it didn’t look great with all the lines.

Is there any foundations available to me that I could use as a base.?

Any adive greatly appreciated 🙂

–Conor

Update:

Hi Guys,

I’ve decided to go back to a html table. I am having extreme difficulty getting my head around the logic used to print the data.

Here is my code for printing the table:

        foreach($bookingList->result_array() as $row)
    {

        $time   = $row['start_time']. ' - ' .$row['end_time'];
        $lesson = $row['lesson_type_name'];
        $client = $row['client_firstname']. ' ' .$row['client_lastname'];
        $horse  = $row['horse_name'];
        $fee    = $row['fee'];


        if(empty($prevLesson) && empty($prevTime))
        {
            echo '1';
            $timeArr    .= $time;
            $lessonArr  .= $lesson;
            $clientArr  .= $client;
            $horseArr   .= $horse;
            $feeArr     .= $fee.'-'.$i;


        }
        elseif($prevLesson == $lesson && $prevTime == $time)
        {               

            echo '3';
            echo '<br/>Previous: '.$prevTime.'++'.$prevLesson.'-'.$i.'<br/>';
            echo '<br/>Current: '.$time.'++'.$lesson.'-'.$i.'<br/>';

            $timeArr    .= $time;
            $lessonArr  .= $lesson;
            $clientArr  .= $client;
            $horseArr   .= $horse;
            $feeArr     .= $fee.'-'.$i;







        }
        else
        {


            echo '3';

            echo '<tr>';

            echo '<td>(3)'. $timeArr .'</td>';
            echo '<td>'. $lessonArr .'</td>';
            echo '<td>'. $clientArr .'</td>';
            echo '<td>'. $horseArr .'</td>';
            echo '<td>'. $feeArr.'</td>';
            echo '<td>'. $i.'</td>';

            echo '</tr>';

            $timeArr = ' ';
            $lessonArr = ' ';
            $clientArr = ' ';
            $horseArr = ' ';
            $feeArr = ' ';
            $optionsArr = ' ';

            $timeArr    .= $time.'<br/>';
            $lessonArr  .= $lesson.'<br/>';
            $clientArr  .= $client.'<br/>';
            $horseArr   .= $horse.'<br/>';
            $feeArr     .= $fee.'-'.$i.'<br/>'; 






        }
        $prevTime = $time;
        $prevLesson =  $lesson;
        $i += 1;
    }

The idea for printing is:
Read data from DB and store in a string. when the data changes (time and lesson type) print the stored string, clear it and assign the new (different data) to the print string.

I have put up the code as is.. i’m just so frustrated and tired now. I have spent 3 hourse every evening this week trying to complete and have failed every time.. If you are willing to help me and need more detailed just let me now..

Any help really appreciated..
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:40:39+00:00Added an answer on May 15, 2026 at 1:40 am

    Soln: After the foreach loop had finished I still had data in the print string. I just echo that after the foreach loop and it solved everything. Thanks for the help input guys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.