GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP question (help) (https://gfy.com/showthread.php?t=1044031)

roganoli 11-01-2011 04:58 PM

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 11-01-2011 05:29 PM

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

fris 11-01-2011 05:41 PM

thats some messy code, why not use a widget?

HomerSimpson 11-01-2011 08:31 PM

try this

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

glowlite 11-01-2011 10:34 PM

You can't nest PHP within PHP.

raymor 11-01-2011 10:51 PM

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.

KickAssJesse 11-01-2011 11:05 PM

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

roganoli 11-02-2011 05:07 AM

Quote:

Originally Posted by raymor (Post 18531281)
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! :thumbsup


All times are GMT -7. The time now is 08:39 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123