Title: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Last modified: August 20, 2016

---

# Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

 *  Resolved [littleb1977](https://wordpress.org/support/users/littleb1977/)
 * (@littleb1977)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/)
 * Hello everyone,
    being quite new to php and wordpress I am having trouble figuring
   out how to fix this error and I would be very grateful if someone could point
   me in the right direction:
 * > Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/skypepro/
   > public_html/fundanovel.com/wp-content/themes/parallelus-salutation/header-default.
   > php on line 43
 * Here is the default header code:
 *     ```
       <?php global $cssPath, $jsPath, $themePath, $theLayout; ?>
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><?php // Force latest IE rendering engine ?>
       <title><?php wp_title('',1,'right'); ?></title>
       <?php // Favorites and mobile bookmark icons ?>
       <link rel="shortcut icon" href="<?php theme_var('options,favorites_icon','http://para.llel.us/favicon.ico'); ?>">
       <link rel="apple-touch-icon-precomposed" href="<?php theme_var('options,apple_touch_icon','http://para.llel.us/apple-touch-icon.png'); ?>">
   
       <?php // JS variables needed to trigger theme functionality ?>
       <script type="text/javascript">
         var fadeContent = '<?php theme_var('options,fade_in_content','none'); ?>';
         var toolTips = '<?php theme_var('options,tool_tips','none'); ?>';
       </script>
   
       <?php
       // WordPress headers.
       // This includes all theme CSS and some JS files. You can add or modify the list from "functions.php"
       wp_head();
   
       // Feed link / Pingback link ?>
       <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>">
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
   
       <?php // jQuery fallback. Will load a local copy if WP Head fails to load. ?>
       <script>!window.jQuery && document.write(unescape('%3Cscript src="<?php echo $jsPath; ?>libs/jquery-1.7.1.min.js"%3E%3C/script%3E'))</script>
   
       <!--[if lte IE 8]>
       <link rel="stylesheet" type="text/css" href="<?php echo $cssPath; ?>ie.css" />
       <![endif]-->
   
       <style type="text/css">
       <?php
       // Body font
       if ($theLayout['body_font']) :
         echo 'body, select, input, textarea {  font-family: '. $theLayout['body_font'] .'; } ';
       endif;
   
       // Default body background
       $bg = get_theme_var('design_setting,body');
       if ( $bg['bg_color'] || $bg['background']) {
         $theBg = ($bg['bg_color']) ? '#'.str_replace('#','',$bg['bg_color']) : 'transparent';
         if ($bg['background']) {
           $theBg .= ' url(''.$bg['background'].'') '.$bg['bg_repeat'].' '.$bg['bg_pos_x'].' '.$bg['bg_pos_y'];
         }
         echo 'body { background: '.$theBg.'; }';
       }
   
       // Heading font
       if ($theLayout['heading_font']['standard']) :
         echo 'h1, h2, h3, h4, h5, h6 {  font-family: '. $theLayout['heading_font']['standard'] .'; } ';
       endif;
   
       // Custom CSS entered in design settings
       if ($customCSS = get_theme_var('design_setting,css_custom')) :
         echo prep_content($customCSS);
       endif;
       ?>
       </style> <?php 
   
       // Custom JavaScript entered in design settings
       if ($customJS = get_theme_var('design_setting,js_custom')) : ?>
       <script type="text/javascript">
         <?php echo prep_content($customJS); ?>
       </script>
       <?php endif; ?>
       ```
   
 * _[Moderator Note: Please post code or markup snippets between backticks or use
   the code button. Or better still – use the [pastebin](http://wordpress.pastebin.com/).
   As it stands, your code may now have been permanently damaged/corrupted by the
   forum’s parser.]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/#post-3021163)
 * On this line
 *     ```
       $theBg .= ' url(''.$bg['background'].'') '.$bg['bg_repeat'].' '.$bg['bg_pos_x'].' '.$bg['bg_pos_y'];
       ```
   
 * Can you try
 *     ```
       $theBg .= url($bg['background']) . $bg['bg_repeat'] . $bg['bg_pos_x'] . $bg['bg_pos_y'] ;
       ```
   
 * If you wanted a space in-between those background styles, try
 *     ```
       $theBg .= url($bg['background']) . ' ' . $bg['bg_repeat'] . ' ' .  $bg['bg_pos_x'] . ' ' . $bg['bg_pos_y'] ;
       ```
   
 *  Thread Starter [littleb1977](https://wordpress.org/support/users/littleb1977/)
 * (@littleb1977)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/#post-3021173)
 * Cheers problem solved!
 * once again… wp forums ride to the rescue 🙂
 *  [gwenhoughton1](https://wordpress.org/support/users/gwenhoughton1/)
 * (@gwenhoughton1)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/#post-3021447)
 * Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘]’
   in /home/gwenh/public_html/askthepsychic.us/wp-content/themes/mystile/includes/
   theme-functions.php on line 664
 * I was over riding checkout fields (using the link below for instruction) when
   all the sudden I got this message on the screen and now I can not get onto my
   website.
 * [http://wcdocs.woothemes.com/snippets/tutorial-customising-checkout-fields-using-actions-and-filters/](http://wcdocs.woothemes.com/snippets/tutorial-customising-checkout-fields-using-actions-and-filters/)
 * ~Gwen
 *  [MarjoriesDaughter](https://wordpress.org/support/users/marjoriesdaughter/)
 * (@marjoriesdaughter)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/#post-3021448)
 * I am teaching a WordPress PHP and Database class. We have been having an awful
   time with the WordPress install. Usually, the problem is that my students copy
   down their database passwords incorrectly from the CPanel. We had a few of those,
   but got over them promptly!
 * However, this series of parse errors is unprecedented. One after another the 
   parse errors affect: author-template.php, category-template.php, deprecated.php,
   general-template.php and update.php. I attribute the problem to 1) bad uploads,
   2) a permissions problem.
 * One of my students is very persistent and deleted and uploaded multiple times.
   He was finally able to get through the parse errors and install.
 * I was able to get through the parse errors to update.php, but have not been able
   to move past that error. The process I used for each successive parse error was
   
   1) Delete the file off the server 2) Copy a new version from the Zip file 3) 
   Upload that file
 * I have cleared my cache and tried on two different computer/wireless combinations.
   I have tried the steps with a fresh download. It would be great to know more 
   about this problem.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING’ is 
closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)

 * 4 replies
 * 4 participants
 * Last reply from: [MarjoriesDaughter](https://wordpress.org/support/users/marjoriesdaughter/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_constant_encapsed_string-3/#post-3021448)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
