Echo within an echo? I'm such a noob

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
crushthenet
Forum Newbie
Posts: 2
Joined: Thu Nov 18, 2010 11:16 am

Echo within an echo? I'm such a noob

Post by crushthenet »

I'm really new to PHP so please take it easy on me.

I would explain all of this stuff but to be honest I don't really understand a lot of it myself. I'm not a programmer, I'm more of a front-end guy.

I'm trying to replace banners.zip with $var7 but don't know how.

I can't echo within an echo and am not sure even where to begin looking beyond that.

And just so you know, everything else works fine, the code works great just like this but I need banners.zip to be replaced with $var7.

This code is in a WordPress theme I'm developing. s1_s2filename is a filename that user enters in admin area of WordPress.

I'm using some special code from the s2member plugin that allows you to protect files and create expiring keys for downloads.

Code: Select all

<?php $var7 = get_option('s1_s2filename'); ?>
				
<a href="<?php bloginfo( 'home' ); ?>/?s2member_file_download=<?php echo $var7; ?>&s2member_file_download_key=<?php echo s2member_file_download_key('banners.zip'); ?>">
<h2>CLICK HERE TO DOWNLOAD YOUR FILE</h2></a>
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: Echo within an echo? I'm such a noob

Post by Luke »

You don't need to echo it. Just replace 'banners.zip' with $var7.
crushthenet
Forum Newbie
Posts: 2
Joined: Thu Nov 18, 2010 11:16 am

Re: Echo within an echo? I'm such a noob

Post by crushthenet »

Thank You very much, appreciate it.

:D
Post Reply