Jump to content

Why does my script output wrong results ?


jd2007

Recommended Posts

<?php

$timea="<script>
var d = new Date()
document.write(d.getTime());</script><br><br>";
echo $timea."<br>";
$timeb="<script>var e = Date.UTC(2006,7,8,11,30,24)
document.write(e);</script>";
echo $timeb."<br>";
echo $timeb - $timea;

?>

this :

echo $timeb - $timea;

...i get output 0.

 

Link to comment
https://forums.phpfreaks.com/topic/63048-why-does-my-script-output-wrong-results/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.