Jump to content

Recommended Posts

Hi Barand,

 

Sorry for disturbing you.

 

I put in end date to make the table more details.

but the layout seem to be incorrect.

The attachment included 2 start date end 2 end date, but they are like combine it together.

 

post-179514-0-67773500-1447384723_thumb.jpg

 

11/03/15-11/04/15  <- is a complete start and end

11/23/15-11/24/15  <- is a complete start and end

You are adding each date as a separate item. You need to add the date pairs as one item then join the items using "<br>"

if ($sd){
        $item = date_format(($sd), 'm/d/y'); //m/d/y
    }
    if ($ed){
         $item .= '-' . date_format(($ed), 'm/d/y'); //m/d/y
    }
    $data[$cid]['events'][$m][]  = $item;
}

Thanks Barand. I have change the line of code as above. it's working!

if ($sd){
        $item = date_format(($sd), 'm/d/y'); //m/d/y
    }
    if ($ed){
         $item .= '-' . date_format(($ed), 'm/d/y'); //m/d/y
         $data[$cid]['events'][$m][]  = $item;       //<--- Move to this line
    }
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.