Splitting datime in PHP : I am doing project to school and need something like this in PHP.

I have 2 datetime value:

    $begin = new DateTime( "2015-07-03 12:00:00" );
    $end   = new DateTime( "2015-07-04 14:00:00" );

and I need to split it to this result:

    val11 = 2015-07-03 12:00:00;
    val12 = 2015-07-03 23:59:59;
     
    val21 = 2015-07-04 00:00:00;
    val22 = 2015-07-04 14:00:00;

Can anybody help me, please?


