Jump to content

Archived

This topic is now archived and is closed to further replies.

JustNeedHelp

Help With One Line

Recommended Posts

I have one line of script that isn't working and I'm not sure why... Could someone help me

[code]<?php
echo ('<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?


Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Explain [i]isn't working[/i].

Share this post


Link to post
Share on other sites
aww no.. when u view ource this comes up:
[code]<link rel="alternate" type="application/rss+xml" title="" href="rss.php?get_cat=" />[/code]

Share this post


Link to post
Share on other sites
Dont Bump threads!

Are you sure $cat is defined?

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

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.