Top

wainey1978 on "Help! Parse error: syntax error"

March 5, 2010 by David Olsen 

I get the following error on my website:

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or ‘$’ in /home/fhlinux135/w/walking.org/user/htdocs/wp-content/themes/WP-MagTheme10-Dev/header.php on line 10

I don’t know php at all – can someone tell me what is wrong with the following code simply?

Many thanks!

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head profile=”http://gmpg.org/xfn/11″>
<meta name=”verify-v1″ content=”Zp13U4jVR/yB9aVnl4h7UiEp9XnTP2NoQVvAhieZiGQ=” />
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

<title><?php wp_title(‘ ‘); ?> <?php if(wp_title(‘ ‘, false)) { echo ‘ : ‘; } ?><?php bloginfo(‘name’); ?></title>

<?php
$sCategoryName = single_cat_title(”,false);
$breadcrumbs = explode(‘|’,get_category_parents_css($cat,true,’|'));
array_pop($breadcrumbs);
array_pop($breadcrumbs);

if ( ($breadcrumbs[0] == “Books”) || ($sCategoryName == ‘Books’) ) { ?>
<link rel=”stylesheet” href=”/wp-content/themes/WP-MagTheme10-Dev/red.css” type=”text/css” media=”screen” />
<?php
}
else if ( ($breadcrumbs[0] == “Fitness”) || ($sCategoryName == ‘Fitness’ )) { ?>
<link rel=”stylesheet” href=”/wp-content/themes/WP-MagTheme10-Dev/green.css” type=”text/css” media=”screen” />
<?php
}
else if ( ($breadcrumbs[0] == “Featured”) || ($sCategoryName == ‘Featured’ )) { ?>
<link rel=”stylesheet” href=”/wp-content/themes/WP-MagTheme10-Dev/purple.css” type=”text/css” media=”screen” />
<?php
}
else if ( ($breadcrumbs[0] == “Health”) || ($sCategoryName == ‘Health’ )) { ?>
<link rel=”stylesheet” href=”/wp-content/themes/WP-MagTheme10-Dev/yellow.css” type=”text/css” media=”screen” />
<?php
}
else if ( ($breadcrumbs[0] == “Weight Loss”) || ($sCategoryName == ‘Weight Loss’ )) { ?>
<link rel=”stylesheet” href=”/wp-content/themes/WP-MagTheme10-Dev/blue.css” type=”text/css” media=”screen” />
<?php
}
else { ?>
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
<?php
}
?>
<link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
<?php echo $style; ?>
<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

<script type=”text/javascript” src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/tabber.js”></script>
<script type=”text/javascript” src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/prototype.js”></script>
<script type=”text/javascript” src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/effects.js”></script>
<script type=”text/javascript” src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/glider.js”></script>

<script type=”text/javascript”><!–//–><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=” sfhover”;
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(” sfhover\b”), “”);
}
}
}
if (window.attachEvent) window.attachEvent(“onload”, sfHover);
//–><!]]></script>

<script type=”text/javascript”>
function display(id) {
if (document.getElementById(id).style.display == ‘block’) {
document.getElementById(id).style.display = ‘none’;
} else {
document.getElementById(id).style.display = ‘block’;
}
return false;
}
</script>

<script type=”text/javascript”>
function display(id) {
if (document.getElementById(id).style.display == ‘block’) {
document.getElementById(id).style.display = ‘none’;
} else {
document.getElementById(id).style.display = ‘block’;
}
return false;
}
</script>

<?php wp_head(); ?>

</head>

<body>

<div id=”wrap” class=”clearfix”>
<div id=”header” class=”clearfix”>
<div class=”sitehead-left”>
<h1>The complete resource for walking, health and diet</h1>
</div>

<div class=”sitehead-right”>

<div id=”headrightbanner”>
<script type=”text/javascript”><!–
google_ad_client = “pub-8311561039744929″;
/* 468×60, created 14/01/09 */
google_ad_slot = “7186263214″;
google_ad_width = 468;
google_ad_height = 60;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
</div>

</div>
<div class=”clear”></div>
</div>

<div id=”nav” class=”clearfix”>
<ul class=”clearfix”>

  • Home
  • <?php wp_list_categories(‘hierarchical=1&title_li=’); ?>

    <li class=”sitesearch”><form action=”http://domain2105431.sites.fasthosts.com/results/” id=”cse-search-box”>

    <input type=”hidden” name=”cx” value=”partner-pub-8311561039744929:e76rfy-cgff” />
    <input type=”hidden” name=”cof” value=”FORID:10″ />
    <input type=”hidden” name=”ie” value=”ISO-8859-1″ />
    <input type=”text” name=”q” size=”20″ />
    <input type=”submit” name=”sa” value=”Search” />

    </form>
    <script type=”text/javascript” src=”http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en”></script>

    </div>

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • Google Bookmarks
    • Yahoo! Buzz
    • Twitter
    • Technorati
    • Live
    • LinkedIn
    • MySpace
    • Share/Bookmark

    Related posts:

    1. sonmanutd on "Parse error: syntax error, unexpected ‘<’" Aw man! I’ve got the same problem on my site,...
    2. txsigma on "All in One SEO not working with theme" Hey Team, I am using the inove theme and I...
    3. LenK on "my first theme – getting a parse/syntax error in php" Heh, I know from experience how easy it is to...
    4. VirtualSanity on "[Plugin: Zingiri Forum] MyBB SQL Error" I’m getting the following error: MyBB SQL Error MyBB has...
    5. apljdi on "php code causing syntax error" 1) I told you what the text says. 2) I...

    Related posts brought to you by Yet Another Related Posts Plugin.

    Comments

    Facebook comments:

    Feel free to leave a comment...
    and oh, if you want a pic to show with your comment, go get a gravatar!





    Security Code:

    Bottom