deltamike Posted January 26, 2020 Share Posted January 26, 2020 Hi, I tried to edit a website that was created a few years ago by a developer. This is done through wordpress. I changed an image address in the code, and on posting got the following: Parse error : syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /homepages/1/d191432458/htdocs/ShropshireHypnobirthing/wp-content/themes/shropshire-hypnobirthing/header.php on line 155 The change I made was on line 194 (highlighed in bold) - and the only change was to change the file from “shropshire-hypnobirthing.png” to “shropshire-hypnobirthing-new.png” When it threw up this error, I immediately changed it back. What is confusing me is that it shows up as line 155 being the error, which was not touched: The line that was changed: <img src="<?php bloginfo('template_directory'); ?>/images/shropshire-hypnobirthing.png" alt="<?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>" /> And the line that is throwing up the error (plus the line before and after): case is_home() || is_page(‘4’): echo “class=“home””; break; If anyone could shine any light on this, I’d be massively appreciative, as the whole website is currently inaccessible! Thanks, Tom Quote Link to comment https://forums.phpfreaks.com/topic/309933-parse-error-syntax-error-unexpected-t_string/ Share on other sites More sharing options...
maxxd Posted January 26, 2020 Share Posted January 26, 2020 The quotation marks in your sting aren't properly escaped. See https://www.php.net/manual/en/language.types.string.php for more details. Quote Link to comment https://forums.phpfreaks.com/topic/309933-parse-error-syntax-error-unexpected-t_string/#findComment-1573822 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.