stevegrant
12-04-2009, 06:03 AM
I'm a bit stuck on a conditional statement - basically, I've got an array of UNIX timestamps that I want to compare with the current UNIX timestamp - generated from time():
The two values I want to compare are:
{vb:raw current_timestamp}
{vb:raw times.this_time}
but the following (and various combinations thereof) doesn't work:
<vb:if condition="{vb:number current_timestamp} < {vb:number times.this_time}">
...
</vb:if>
The error message displayed is:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '{' in /www/vb4/upload/includes/adminfunctions_template.php(4516) : eval()'d code on line 17
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Any ideas as to how I can perform this (relatively simple!) comparison?
The two values I want to compare are:
{vb:raw current_timestamp}
{vb:raw times.this_time}
but the following (and various combinations thereof) doesn't work:
<vb:if condition="{vb:number current_timestamp} < {vb:number times.this_time}">
...
</vb:if>
The error message displayed is:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '{' in /www/vb4/upload/includes/adminfunctions_template.php(4516) : eval()'d code on line 17
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Any ideas as to how I can perform this (relatively simple!) comparison?