I'll get dates from Mysql database,
but I am stucked by this
beginjob1=01.01.2001 15:00
endjob1=05.01.2001 18:00
beginjob2=03.01.2001 12:00
endjob2=04.01.2001 18:00
I try to output those jobs like msProject
with different colors, colors I get from function "bar" but how can I calculate those values like:
job1lasts=4day, 3howrs
job2lasts=1day, 6howrs
also I need output this like
j=job1
d=job2
jjdddddjjjjjjjj
//here I cet colors
function bar($color)
{
$r = hexdec(substr($color, 0, 2));
$g = hexdec(substr($color, 2, 2));
$b = hexdec(substr($color, 4, 2));
Header("Content-type: image/gif");
$image = ImageCreate(5, 20);//x, y
$red = ImageColorAllocate($image, $r, $g, $b);
$black=imagecolorallocate($image, 0, 0, 0);
ImageRectangle($image, 0, 0, 4, 19, $black);
ImageJPEG($image);
ImageDestory($image);
echo "<br>";
}
//bar("BFB093");