Hi guys,
I am working on my tv guide website that I output the data to my php from mysql database. I want to know how i can work it out the tv time for per programme how long they would last for, e.g 30 mins, 1 hour...etc
<html>
<body>
<style type="text/css">
#channel1 {
position:absolute;
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
visibility:visible;
overflow:hidden;
left:35px; top:245px; width:176px; height:50px;
z-index:1;
}
#programme1 {
position:absolute;
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
visibility:visible;
overflow:hidden;
left:427px; top:245px; width:176px; height:50px;
z-index:1;
}
#programme2 {
position:absolute;
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
visibility:visible;
overflow:hidden;
left:765px; top:245px; width:176px; height:50px;
z-index:1;
}
#programme3 {
position:absolute;
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
visibility:visible;
overflow:hidden;
left:1110px; top:245px; width:176px; height:50px;
z-index:1;
}
#day {
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
position:absolute;
visibility:visible;
overflow:hidden;
left:294px; top:180px; width:176px; height:50px;
z-index:0;
}
#time1 {
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
position:absolute;
visibility:visible;
overflow:hidden;
left:424px; top:180px; width:176px; height:50px;
z-index:0;
}
#time2 {
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
position:absolute;
visibility:visible;
overflow:hidden;
left:754px; top:180px; width:176px; height:50px;
z-index:0;
}
#time3 {
font-family:Arial;
font-size:29px;
font-style:normal;
font-weight:bold;
color:f5fdfd;
text-decoration:none;
text-transform:none;
position:absolute;
visibility:visible;
overflow:hidden;
left:1104px; top:180px; width:176px; height:50px;
z-index:0;
}
<?php
include("get-listing.php");
?>
<div id="image1" style="position:absolute; overflow:hidden; visibility:visible; left:21px; top:245px; width:374px; height:40px; z-index:0"><img src="/images/row1_yellow.jpg" alt="" title="" border=0 width=374 height=50></div>
<div id="image2" style="position:absolute; overflow:hidden; visibility:visible; left:21px; top:295px; width:374px; height:40px; z-index:0"><img src="/images/row1.jpg" alt="" title="" border=0 width=374 height=50></div>
<div id="image3" style="position:absolute; overflow:hidden; visibility:visible; left:21px; top:345px; width:374px; height:40px; z-index:0"><img src="/images/row1.jpg" alt="" title="" border=0 width=374 height=50></div>
</body>
</html>
I am using the row1 as per image to resize it for per programme, but i have no idea how i can compare with each timing for per programme before resizing on per image.
here is what my php displaying:
<span id='time1'>1:00 PM</span> - <span id='title1'>SportsCenter</span><br></br><span id='time2'>2:00 PM</span> - <span id='title2'>SportsCenter</span><br></br><span id='time3'>3:00 PM</span> - <span id='title3'>SportsCenter Special: On the Clock</span><br></br><span id='time4'>4:00 PM</span> - <span id='title4'>NFL Live</span><br></br>
I want to know how to work it out on per timing how long the programme will last for, e.g I want to work it out between time1 and time2 to find out how long it will last which it make 60 mins.
Does anyone know how i can compare with each timing on per programme before resizing on per image?
Any advice would be much appreicated.
Thanks in advance