Basically the $usr_timestamp
is updated every 10 seconds. Now I have one If statement which states if the $usr_timestamp
was updated within the 10 second gap then to echo within the ten seconds
What I am trying to achieve is to also echo out not within the ten seconds
. I thought that I could achieve this by changing the greater than
to a less than
however this did not work. Any suggestions?
Example
$usr_timestamp = $usr['timestamp'];
$timeout = time(-10);
if ('$usr_timestamp' > '$timeout'){
echo 'within the ten seconds';
}
What I'm trying to do is set a condition for if the $usr_timestamp
hasn't been updated within the last 10 seconds.
This is what I thought would work;
if ($usr_timestamp < '$timeout'){
echo 'not within the ten seconds.';
}