Mark Kennedy Mark Kennedy - 2 years ago 323
PHP Question

PHP equivalent of JavaScript getTime()

Suppose I'm running the following JavaScript getTime() function

<script language="JavaScript">
var $x = Math.round((new Date()).getTime()/1000);

What would the equivalent code in PHP look like?

Answer Source

Unix time in php

$time_stamp = time();
echo $time_stamp;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download