JustNeedHelp Posted October 7, 2006 Share Posted October 7, 2006 I have one line of script that isn't working and I'm not sure why... Could someone help me[code]<?phpecho ('<a href="'.$acfolder.'rss.php?get_cat='.$cat.'"><img src="/content/images/icons/rss.gif" alt="RSS Feed" width="40" height="40" border="5" style="border-color:#02a5cb" /></a>')?>[/code]That code works which means my variables are correct[code]<link rel="alternate" type="application/rss+xml" title="<?php echo ($cat) ?>" href="<?php echo ($acfolder.'rss.php?get_cat='.$cat) ?>" />[/code]This code doesnt work... can anyone fix it for me? Quote Link to comment Share on other sites More sharing options...
printf Posted October 7, 2006 Share Posted October 7, 2006 Just one way to do it![code]<link rel="alternate" type="application/rss+xml" title="<?=$cat;?>" href="<?=$acfolder;?>rss.php?get_cat=<?=$cat;?>" />[/code]me! Quote Link to comment Share on other sites More sharing options...
trq Posted October 7, 2006 Share Posted October 7, 2006 Explain [i]isn't working[/i]. Quote Link to comment Share on other sites More sharing options...
JustNeedHelp Posted October 7, 2006 Author Share Posted October 7, 2006 aww no.. when u view ource this comes up: [code]<link rel="alternate" type="application/rss+xml" title="" href="rss.php?get_cat=" />[/code] Quote Link to comment Share on other sites More sharing options...
JustNeedHelp Posted October 7, 2006 Author Share Posted October 7, 2006 Bump...Can anyone help me with this? Quote Link to comment Share on other sites More sharing options...
trq Posted October 7, 2006 Share Posted October 7, 2006 Dont Bump threads!Are you sure $cat is defined? Quote Link to comment Share on other sites More sharing options...
JustNeedHelp Posted October 7, 2006 Author Share Posted October 7, 2006 Sorry about the bump.And it must be because the other code works with $cat in it >> Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 7, 2006 Share Posted October 7, 2006 [quote author=JustNeedHelp link=topic=110757.msg448365#msg448365 date=1160186279]And it must be because the other code works with $cat in it >>[/quote]So maybe 'short tags' aren't enabled for you, if you used printf's solution. Quote Link to comment Share on other sites More sharing options...
JustNeedHelp Posted October 7, 2006 Author Share Posted October 7, 2006 They are.... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted October 7, 2006 Share Posted October 7, 2006 Can we see where these lines are located in your script? Is the one that works before or after the one that doesn't work? Are either of them in a function? We need to see more of your script to be able to help you. Having seen two lines out of context does us no good.Ken Quote Link to comment 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.