Jump to content

echo HREF variable inside PHP tags


aviatorisu

Recommended Posts

Okay, I must be having a serious brainfart here, because I can't seem to put together how to make this work:

[code]
<!-- START VIEW MENU -->
<TD ALIGN="CENTER" WIDTH="120" BGCOLOR="#FFFFFF">
<?php if ( $menu != 'NULL' ) {    echo "<A HREF='../menus/$menu#zoom=150[,0,0]&toolbar=false' target='popup' onClick='wopen('../menus/$menu#zoom=100[,0,0]&toolbar=false', 'popup', 800, 600); return false;'>Menu</A>";}
?>
</TD>
<!-- END VIEW MENU -->
[/code]

I need the $menu variable to echo within the A HREF tags...why can't I think straight tonight??

Thanks in advance...

~Z~
Link to comment
Share on other sites

[!--quoteo(post=377504:date=May 26 2006, 10:42 PM:name=hvle)--][div class=\'quotetop\']QUOTE(hvle @ May 26 2006, 10:42 PM) [snapback]377504[/snapback][/div][div class=\'quotemain\'][!--quotec--]
then put the $menu inside the href:

echo "<a href=\"$menu\"> ..... ";
[/quote]

It IS in there, and that doesn't work...I tried it that way...

~Z~
Link to comment
Share on other sites

then $menu is null.

your if statement maybe wrong:

if ( $menu != 'NULL' ) return true if $menu does not contain the word 'NULL' itself.

you may want to change to
if ($menu != null)
or
if ( $menu != '' )
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.