aviatorisu Posted May 27, 2006 Share Posted May 27, 2006 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~ Quote Link to comment https://forums.phpfreaks.com/topic/10561-echo-href-variable-inside-php-tags/ Share on other sites More sharing options...
hvle Posted May 27, 2006 Share Posted May 27, 2006 then put the $menu inside the href:echo "<a href=\"$menu\"> ..... "; Quote Link to comment https://forums.phpfreaks.com/topic/10561-echo-href-variable-inside-php-tags/#findComment-39385 Share on other sites More sharing options...
aviatorisu Posted May 27, 2006 Author Share Posted May 27, 2006 [!--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~ Quote Link to comment https://forums.phpfreaks.com/topic/10561-echo-href-variable-inside-php-tags/#findComment-39386 Share on other sites More sharing options...
hvle Posted May 27, 2006 Share Posted May 27, 2006 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 toif ($menu != null)or if ( $menu != '' ) Quote Link to comment https://forums.phpfreaks.com/topic/10561-echo-href-variable-inside-php-tags/#findComment-39391 Share on other sites More sharing options...
aviatorisu Posted May 27, 2006 Author Share Posted May 27, 2006 Okay, it is working now somewhat...The IF, ELSE statement works, but when using \"$menu\" , I am getting the url with quotes around it, and that is not working...~Z~ Quote Link to comment https://forums.phpfreaks.com/topic/10561-echo-href-variable-inside-php-tags/#findComment-39517 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.