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? Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/ 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! Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105350 Share on other sites More sharing options...
trq Posted October 7, 2006 Share Posted October 7, 2006 Explain [i]isn't working[/i]. Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105351 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] Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105354 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? Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105364 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? Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105366 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 >> Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105367 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. Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105369 Share on other sites More sharing options...
JustNeedHelp Posted October 7, 2006 Author Share Posted October 7, 2006 They are.... Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105370 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 Link to comment https://forums.phpfreaks.com/topic/23237-help-with-one-line/#findComment-105548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.