Ask Experts Questions for FREE Help !
Ask

[php] unexpected T_STRING error

Asked Apr 7, 2012, 04:38 AM — 1 Answer
why does $visitdate = date(d/m/Y h:i:s A O); results in an unexpected T_STRING error?

1 Answer
bobobeer's Avatar
bobobeer Posts: 13, Reputation: 1
New Member
 
#2

May 30, 2012, 05:25 PM
Try this:

Code:
$visitdate = date('d/m/Y h:i:s A O');
You need to pass in a string as the date functions parameter, so add some quotes around what you are passing in to make it a string.

For more on this function please refer to PHP: date - Manual
Helpful

Not your question? Ask your question View similar questions

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Add your answer here.

Remove Text Formatting

Undo
Redo
 
Decrease Size
Increase Size
Bold
Italic
Underline
Align Left
Align Center
Align Right
Ordered List
Unordered List
Decrease Indent
Increase Indent
Insert Email Link
Wrap [QUOTE] tags around selected text
Wrap [CODE] tags around selected text
Wrap [HTML] tags around selected text
Wrap [PHP] tags around selected text
Wrap [YOUTUBE] tags around selected text
Notification Type:



Check out some similar questions!

Insert Image in a PHP Script. Here is my error... [ 1 Answers ]

I don’t usually don’t have a problem. This is my script below, following my error message. I've tried everything. What I'm I missing? <img src="images/flightattendant.jpg" alt="Jeanne - Your flight attendant" width="378" height="851" align="right" /> <?php Session_start(); // Force...

Error in php [ 2 Answers ]

I done a project. I write a following php script and create the mysql database.But I run the php file they show me error. What is the error <?php $con=mysql_connect("localhost","root"); If(!$con){ die('could not connect:'.mysql_error()); } Mysql_select_db("project",$con);

What can I do for unexpected system error [ 1 Answers ]

Hi I can't open some online application. I am being told that unexpected system error please try again later. I couldn't find out what system error in my laptop

Unexpected c-tree(R) error #215 [ 3 Answers ]

The problem occurs just after logging into win2000, if I click ok in the error box I get a blank screen for a few seconds & then the desktop reappears, followed shortley by the error again If I don't click ok in the error box I can use the pc as normal but it is very laggy The problem does...


View more PHP questions Search