So I have a php file called Time.php:
<?php echo (( $DateTime.date("n/j/Y g:i:s A").Hour + ":" + $DateTime.date("n/j/Y g:i:s
A").Minute + ":" + $DateTime.date("n/j/Y g:i:s A").Second ) ?>
This was originally in ASP, but I used a translator tool to get it into PHP, so it might be syntactically incorrect. Whenever I launch the page in my localhost, it gives me an error, saying there’s an unexpected semicolon on line 2. In my file, as opposed to the above, line 2 is ":" + $DateTime.date("n/j/Y g:i:s A").Second ) ?>. As you can already see there are no semicolons in the entire file, let alone in the second line. Why is it giving me this error (I’m using WAMPserver, it’s turned on, working, etc)?
Objects in PHP are:
not
String concatenation is done like:
not