The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Syntax Error Unexpected T_String In String Concatination (3 posts)

  1. avil
    Posted 4 years ago #

    The syntax error Iam getting while editing the code in my theme's functions.php is on line 88, where I added a new line of code ..

    Here's the code :

    $popular .= '<a href="<?php the_permalink(); ?>"><img src="<?php echo bloginfo('template_url'); ?>/timthumbs.php?src=<?php echo catch_that_image() ?>&w=200&h=100&zc=3&q=100" alt="<?php the_title(); ?>" class="footer-thumb" width="200px" height="100px" /></a>'

    Iam unable to figure out the correct escaping required ..

    Kindly help ..

  2. SpaceDogDeveloper
    Posted 4 years ago #

    You have php tags inside a variable. You can't have more php tags in there.

    $popular .= '<a href="><?php somecode(); ?>"> <--- wrong
    $popular .= '<a href="' . somecode() . '"> <---- correct


  3. avil
    Posted 4 years ago #

    Thanks SpaceDogDeveloper, got that working.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.