Simple: What is wrong with this?

Discussion in 'PHP' started by Daniel591992, Nov 16, 2008.

  1. #1
    <?php if ( "<?php echo c2c_get_custom('post_image_width'); ?>" > 200 ): ?>


    GOOGLE ADSENSE CODE HERE


    <?php endif; ?>


    The "<?php echo c2c_get_custom('post_image_width'); ?>" is a custom field I use in wordpress to indicate a numerical value. I want it to be like if 300 > 200, then show adsense.
     
    Daniel591992, Nov 16, 2008 IP
  2. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    why not just put it this way
    <?php
      if(c2c_get_custom('post_image_width') > 200)
      { 
           {GOOGLE_CODE_HERE}
      }
    ?>
    PHP:
     
    Spawny, Nov 16, 2008 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    it will be a warning..

    erase <?php echo ....
    complete the if statement under php tags
     
    bartolay13, Nov 16, 2008 IP
  4. Daniel591992

    Daniel591992 Well-Known Member

    Messages:
    594
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    125
    #4
    Hi, it's not accepting the "<" in the adsense code.
     
    Daniel591992, Nov 16, 2008 IP
  5. Daniel591992

    Daniel591992 Well-Known Member

    Messages:
    594
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    125
    #5
    I got it working. Thanks!
     
    Daniel591992, Nov 16, 2008 IP