且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在使用“While”时遇到问题

更新时间:2022-04-12 23:16:00

Heya,AJM。


你想要什么?代码呢?举个例子。

你的代码是做什么的,你不想要它做什么?举个例子。

你的代码是什么*不是*它应该这样做?举个例子。
Heya, AJM.

What do you want your code to do? Give an example.
What is your code doing that you don''t want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.


我希望我的代码能够获得所有带有page字样的元标记。然后,在元标记的名称区域中检索内容字段并将具有;的两个区域分开。然后在它中回显两个区域,以便它显示在一个网址中。因此,用户可以点击它以便用户转到网站显示的另一个页面。


在用户网站中:

< meta name ="页面&QUOT; content =" Downloads; http://www.domain123.com/Downloads">

< meta name =" page" content ="联系我们; http://www.domain123.com/Contact_Us">


使用while脚本在我的页面上回显它会回显数字页面元标记的显示方式如下:


< a href =" http://www.domain123.com/Downloads"> Downloads< / a>


< a href =" http://www.domain123.com/Contact_Us">联系我们< / a>


右现在,当我有多个页面元标记时,脚本会回显第二页元标记两次并且不显示第一个元标记。


这里有关于bug的操作:
http://www.bombinaid。 com / search.php?... binaid& orgin = 1


只需点击我的网站在结果区域的网址后面的问号。

然后在弹出窗口中的Redirect Links下查看。
I want my code to get all the meta tags that have the word "page" in the name area of the meta tag then retrieve the content field and separate the two areas that have a ";" in it then echo out the two areas so it will show in a url. So the user may click on it for the user to goto another page the site shows.

In the users website:
<meta name="page" content="Downloads;http://www.domain123.com/Downloads">
<meta name="page" content="Contact Us;http://www.domain123.com/Contact_Us">

Echo on my page using the while script that are made so it will echo the number of page meta tags and display them like so:

<a href="http://www.domain123.com/Downloads">Downloads</a>

<a href="http://www.domain123.com/Contact_Us">Contact Us</a>

Right now when I do have more then one page meta tag the script is echoing the second page meta tag two times and not showing the first one.

Here it is on action with the bug:
http://www.bombinaid.com/search.php?...binaid&orgin=1

Just click on the question mark after the url of my website on the results area.
Then look under Redirect Links in the popup window.


你应该d考虑使用 foreach 循环。


赞所以:
You should consider using the foreach loop.

Like so:
展开 | 选择 | Wrap | 行号