unexpected T_CONSTANT_ENCAPSED_STRING in... |
![]() ![]() |
unexpected T_CONSTANT_ENCAPSED_STRING in... |
Nov 3 2009, 03:32 PM
Post
#1
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 7,885 Joined: 23-November 08 Member No.: 6,521 |
I am new to PHP and could use any help I can get. I am getting two errors with the code below:
1) Unexpected character in input: '' (ASCII=92) state=1 2) syntax error, unexpected T_CONSTANT_ENCAPSED_STRING Both in like 21, which is $error line... any help would be amazing. Thank you! Code: <?php // IE6 string from user_agent $ie6 = "MSIE 6.0"; // detect browser $browser = $_SERVER['HTTP_USER_AGENT']; // yank the version from the string $browser = substr("$browser", 25, 8); // html for error $error = "<div class=""error"" id=""error""><strong>Alert:</strong> It appears that you are using an out dated web browser Internet Explorer. While you may still visit this website we encourage you to upgrade your web browser so you can enjoy all the rich features this website offers as well as other websites. Follow this link to <a href=""http://www.microsoft.com/windows/downloads/ie/getitnow.mspx""><strong>Upgrade your Internet Explorer</strong></a><br><div class=""kickRight""><a href=""java script:" killit('error');"=""> Close This Box</a></div></div>"; // if IE6 set the $alert if($browser == $ie6){ $alert = TRUE; } ?> |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 04:14 PM |