在使用“While”时遇到问题 [英] Having trouble use "While"

查看:78
本文介绍了在使用“While”时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我把我的东西分开了,但是我怎么能正常工作所以它会正确显示所有数组?就像你在哪里使用Mysql来检索数据一样。但是这一次它检索所有页面元标记并将它们显示在列表中。


这是我自己制作的元标记,我用于脚本:

Ok I got my stuff to split, but how can I have the while work correctly so it will show all of the arrays correctly? Like if you where using Mysql to retrieve data. But this time it is retrieving all the page meta tags and displaying them in a list.

Here is my own Meta Tag I made that I am using for the script:

展开 | 选择 | Wrap | 行号

推荐答案

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 ="页面" 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 | 行号


这篇关于在使用“While”时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆