Jump to content

else if help


adzie

Recommended Posts

Hello,

 

I've been working on a last visit script for my site.

 

If the user has never visited then I want it to show never, however if they have visited I'd like it to display the date.

 

 

However with my attempt thus far I get the error  Parse error: syntax error, unexpected T_ELSE in reffering to the 'else' line

 

I'd appreciate any direction  :)

 

 


if  ($last == "never");  {         
$raid = "never";
}
else
{
$raid = date("d-m-Y", strtotime($last));
}

Link to comment
https://forums.phpfreaks.com/topic/132826-else-if-help/
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.