Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lenamarie
    New Member
    • Jan 2011
    • 2

    #1

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

    I received this full message today after updating the copyright year.

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/g/a/r/garybryan/html/wp-content/themes/thesis/custom/custom_function s.php on line 23

    Here is the coding for line 23:
    Code:
    echo "<p><small>Copyright &copy; 2011 <a href=\"http://whatstoxic.com.com/\" 
    
    title=\"Whatstoxic.com\">WhatsToxic.com</a> - Dr Gary Ginsberg | Built with <a href=\"http://diythesis.com/\" 
    
    title=\"Wordpress Thesis Theme by DIY Themes\">Thesis Theme</a> by  <a 
    
    href=\"http://www.konakiko.com/hireme/\"Title=\"Websites by konakiko\">konakiko</a> | <a 
    
    href=\"http://whatstoxic.org/wp-admin/\" title=\"login\">Login</a></small></p>";
    Can someone please help? I am helping a friend with this site and she cannot afford for her site not to be working.

    Thanks so much.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    This is PHP. It looks alright. Is it all on one line or are there carriage returns in there?
    I would prefer this
    Code:
    echo '<p><small>Copyright &copy; 2011
    <a href="http://whatstoxic.com.com/" title="Whatstoxic.com">WhatsToxic.com</a> - Dr Gary Ginsberg | Built with
    <a href="http://diythesis.com/" title="Wordpress Thesis Theme by DIY Themes">Thesis Theme</a> by
    <a href="http://www.konakiko.com/hireme/"Title="Websites by konakiko">konakiko</a>|
    <a href="http://whatstoxic.org/wp-admin/" title="login">Login</a></small></p>';
    Without CR which I have added for easy viewing

    Comment

    • lenamarie
      New Member
      • Jan 2011
      • 2

      #3
      Hi, it got the CR's because I had copied it into word to get a character coount. When I look @ it in notepad ++ that whole section is on line 23. If its ok I am still getting the error message. I will post the surrounding code to see if the error is on a different line.

      now i cannot even get into the admin panel of my website because of the error. i have wordpress and when i go to the page to login i just get the error. here is the code for the whole footer script.

      Code:
      /* To add my own footer */ 
      function rl_footer() { 
      echo "<p><small>Copyright &copy; 2011 <a href=\"http://whatstoxic.com.com/\" title=\"Whatstoxic.com\">WhatsToxic.com</a> - Dr Gary Ginsberg | Built with <a href=\"http://diythesis.com/\" title=\"Wordpress Thesis Theme by DIY Themes\">Thesis Theme</a> by  <a href=\"http://www.konakiko.com/hireme/\"Title=\"Websites by konakiko\">konakiko</a> | <a href=\"http://whatstoxic.org/wp-admin/\" title=\"login\">Login</a></small></p>"; 
      } 
      remove_action('thesis_hook_footer', 'thesis_attribution'); 
      add_action('thesis_hook_footer', 'rl_footer');
      this script is located in the custom functions.php file in wordpress. i simply changed the copyright 2009 to say 2011 and when i clicked updated i have gotten the syntax error ever since. even though the error says line 23, i am thinking it could be located somewhere else in the coding.

      if it helps at all i am using the Thesis theme for wordpress.

      Can anyone help me please. i think these codes are going to drive me crazy!
      Last edited by lenamarie; Jan 26 '11, 02:48 PM. Reason: added more coding

      Comment

      Working...