Unexpected T_ECHO...

Discussion in 'PHP' started by timallard, Apr 13, 2008.

  1. #1
    Ok this is bugging me. Heres a quick overview of the scenario.
    Im using a wordpress custom field to hold the value of a poll ID im generating for my posts.

    here is the code:
    <?php get_poll(echo get_post_meta($post->ID, "map", true));?>

    any idea why im getting an unexpected T_ECHO?
    "Parse error: syntax error, unexpected T_ECHO, expecting ')' in"

    Thanks!
    -Tim
     
    timallard, Apr 13, 2008 IP
  2. JLEville

    JLEville Peon

    Messages:
    147
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm pretty sure you don't need the echo in front of the get_post_meta...thats probably why. If not, we'd need more details I think.
     
    JLEville, Apr 13, 2008 IP
  3. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Taking the echo out resolved the problem.
     
    Colbyt, Apr 13, 2008 IP