PHP question (help)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roganoli
    Confirmed User
    • Dec 2004
    • 757

    #1

    PHP question (help)

    Please help me this work...

    Code: (not Work)
    <?php echo do_shortcode('[twitter-feed mode="search" term="<?=$USERNAME?>"]');?>

    <?=$USERNAME?> not work in this echo code...

    Any help?
  • V_RocKs
    Damn Right I Kiss Ass!
    • Nov 2003
    • 32449

    #2
    change the < and ?= in front of $USERNAME to '.
    then ? > to .'
    YES - you will have "'.$USERNAME.'"

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      thats some messy code, why not use a widget?
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • HomerSimpson
        Too lazy to set a custom title
        • Sep 2005
        • 13826

        #4
        try this

        <?php echo do_shortcode('[twitter-feed mode="search" term="'.$USERNAME.'"]');?>
        Make a bank with Chaturbate - the best selling webcam program
        Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

        PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

        Comment

        • glowlite
          Confirmed User
          • Dec 2005
          • 366

          #5
          You can't nest PHP within PHP.

          Comment

          • raymor
            Confirmed User
            • Oct 2002
            • 3745

            #6
            Tis called concatenation:

            <?php echo do_shortcode('[twitter-feed mode="search" term="' . $USERNAME . ']'); ?>

            Please tell me the USERNAME variable is populated by code written by someone cluefull. Tell me you're not setting that with code you wrote. It's cool that you're learning PHP. Both Rasmus and Linus know they have no business designing security systems though, so you're about a decade or two of intensive study away from being qualified to do so.
            Last edited by raymor; 11-01-2011, 09:55 PM.
            For historical display only. This information is not current:
            support&#64;bettercgi.com ICQ 7208627
            Strongbox - The next generation in site security
            Throttlebox - The next generation in bandwidth control
            Clonebox - Backup and disaster recovery on steroids

            Comment

            • KickAssJesse
              Confirmed User
              • Jul 2008
              • 942

              #7
              What raymor said... use concatenation to weave in and out of php

              Contact - email: jesse~AT~atkcash~DOT~com - Skype: kickassjesse - ICQ: 386185547
              ATK Cash $$$

              Comment

              • roganoli
                Confirmed User
                • Dec 2004
                • 757

                #8
                Originally posted by raymor
                Tis called concatenation:

                <?php echo do_shortcode('[twitter-feed mode="search" term="' . $USERNAME . ']'); ?>

                Please tell me the USERNAME variable is populated by code written by someone cluefull. Tell me you're not setting that with code you wrote. It's cool that you're learning PHP. Both Rasmus and Linus know they have no business designing security systems though, so you're about a decade or two of intensive study away from being qualified to do so.
                this is ... thanks a lot!

                Comment

                Working...