Monk3h Posted July 29, 2009 Share Posted July 29, 2009 I am trying to create a script to alow users to use multiple layouts on my site and i have hit an error. =/# Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/monk3h/public_html/portfolio/header.php on line 8 The script is all below, line 8 is line 8 in the script. <?php $default_layout = “01”;if (!$HTTP_COOKIE_VARS[‘layout’]) { $include_layout = $default_layout; } else { $include_layout = $HTTP_COOKIE_VARS[‘layout’]; } if (!file_exists(“./header”.$include_layout.”.php”)) { echo “Could not include header”; } else { include_once (“./header”.$include_layout.”.php”); } ?> Quote Link to comment Share on other sites More sharing options...
TeNDoLLA Posted July 29, 2009 Share Posted July 29, 2009 I really donät know why you use such a weird characters for strings.. try using single or double quotes everywhere instead. <?php $default_layout = '01';if (!$HTTP_COOKIE_VARS['layout']) { $include_layout = $default_layout; } else { $include_layout = $HTTP_COOKIE_VARS['layout']; } if (!file_exists('./header'.$include_layout.'.php')) { echo 'Could not include header'; } else { include_once ('./header'.$include_layout.'.php'); } ?> Edit: as you can see already from this forum, the highlighting shows how much is wrong in your code by using these... don't know what they are called. Quote Link to comment Share on other sites More sharing options...
Monk3h Posted July 29, 2009 Author Share Posted July 29, 2009 Thankyou! Works now, i thought they were double qoutes. o.O Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.