Jump to content

Parse error: syntax error, unexpected '['


ebolt007

Recommended Posts

I'm getting a parse error on line 302:

Parse error: syntax error, unexpected '[' in /home/bhharley/public_html/newsite2/calendar/admin.php  on line 302

 

Line 302 is

$day = getdatefromcalendarformat( $_REQUEST['dt'] )[2];

 

If I take out the [2] it works, but the calendar I'm working on breaks of course. How do I fix this?

Link to comment
https://forums.phpfreaks.com/topic/200968-parse-error-syntax-error-unexpected/
Share on other sites

Great thanks, that fixed that but now I have one more error.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/bhharley/public_html/newsite2/calendar/admin.php on line 575

 

here's the line 

$_REQUEST['dt'] = strtotime( $year."-".$month * 1."-".$day );

 

Thanks in advance.

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.