Jump to content

Recommended Posts

On my site, I currently have a page that lists my team's fixtures: http://www.cfrclunj.co.uk/fixtures.php

 

As can be seen, in between each separate month there is a row of blank, grey cells.

 

I am now updating the site so that it takes all information from a database (for easier update). On my test page (at bottom) I have recreated the fixtures table using my db: http://www.cfrclunj.co.uk/db_test.php

 

What I am wondering is if there is any way to get the grey monthly separater row into my table. Could this be done by inserting a row of data into the db table that uses an if statement to change it's appearance? Or could I somehow use MYSQL/PHP to make it put a row in for each separate month?

 

I have to admit my PHP and MYSQL skills are still at a very basic level, and so any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/221022-table-rows-help/
Share on other sites

You need to group the results into an associative array that will make it easier to loop over and add a break i.e

array('oct 2010' => array(array('05 October','Calvert Smith','6.45pm',Roko'),
                                         array('12 October','Thermal Pigs','7.45pm','Roko'))
         'nov 2010' => array(array('02 November','FC Not A Clue','6.45pm','Roko'),
                                         array('09 November','Inter York','5.45pm','Roko')));

Link to comment
https://forums.phpfreaks.com/topic/221022-table-rows-help/#findComment-1144458
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.