hi
does anyone know how i might be able to echo a java script
example
chat box
but i want to print th time after $msgPHP Code:<?php echo $msg; ?><i> <script type="text/javascript">
<!--
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10)
minutes = "0" + minutes
document.write(hours + ":" + minutes)
if(hours > 11){
document.write("pm")
} else {
document.write("am")
}
//-->
</script></i>
i tried the normal php tags time() but it prints it without a format...just numbers
i tried print date("D dS M,Y h:i a"); but that prints a different time zone. my hosting company's time zone perhaps




Reply With Quote