duanhemou9834 2015-05-11 20:24
浏览 60

PHP标签内的PHP标签?

So I just follow this guide:

http://www.bitrepository.com/php-how-to-add-multi-language-support-to-a-website.html

And everything is working but now I got in to a problem:

Everywhere that I want text I place: <?php echo $lang['FOOTER_CURRENCY']; ?>

But I have a php code for RSS feed: (right inside my php file)

<?php
    // Show number of items  
    $items = 6;  

    // Load rss into simplexml rss from pctuts http://www.pctuts.be/external.php?do=rss&type=newcontent&sectionid=1&days=120&count=10 just replace this link voor the right one
    $rss        = simplexml_load_file('http://test.blogspot.com/feeds/posts/default?alt=rss'); 

    // show last items  
    for($i=0;$i<$items;$i+=1)  
       {  
       echo "<div class=\"channel\"><a href=\"{$rss->channel->item[$i]->link}\" target=\"_blank\">{$rss->channel->item[$i]->title}</a></div>
";
       }  

    ?>

Now I wan't to replace the RSS Feed link with every language. So I replaced this like I usualy do:

This:

$rss        = simplexml_load_file('http://cupandsaucersweden.blogspot.nl/feeds/posts/default?alt=rss');

To:

$rss        = simplexml_load_file('<?php echo $lang['FOOTER_RSSFEED']; ?>');

Well ofcourse a php tag inside a php tag won't work so I did this:

$rss        = simplexml_load_file('echo $lang['FOOTER_RSSFEED']; ');

Doesn't work either, I tried many other things but it just won't work. Can someone help me with this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信小程序协议怎么写
    • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看