ok i have a script that output the contents of a table one of the values is a time which is shown in the follpwing format HHMM
problem being i need tro to be output into HH:MM but how?
my code:
<table border="2" cellspacing="0">
<tr><td><b>Frame ID</b></td><td><b>Frame Type</b></td><td><b>Frame No.</b></td><td><b>Frame Hours</b></td><td><b>Frame Location</b></td></tr>
<?php
include "config.php3";
$query = mysql_query("SELECT * FROM $table") or die(mysql_error());
while($row = mysql_fetch_array($query)){
$acid = $row['id'];
$actype = $row['aircrafttype'];
$achours = $row['hours'];
$acframe = $row['frame'];
$aclocation = $row['location'];
//// Check to see if Aircraft Loation is set to missing if true Bold the Word missing and font colour to red
if($aclocation == 'Missing')
{
$aclocation = "<font color='red'><b>Missing</b></font>";
}
// check to see if the Aircraft Hours are less that 999 if they are add 0 to beggining to make it a 4 digit number
if($achours <999)
{
$achours ="0$achours";
}
print ("<tr><td>$acid</td><td>$actype</td><td>$acframe</td><td>$achours</td><td>$aclocation</td></tr>
");
}
print ("</table>");
?>