We iterate through it with foreach.
我们用foreach来遍历它。
We can do this simply using a pair of foreach loops.
只需使用一对foreach循环即可完成此操作。
You may think it more closely resembles a foreach loop.
您可能认为它更像foreach循环。
Inside the foreach loop, add the line in bold shown in Listing 5.
将清单5中显示的粗体代码行添加到foreach循环中。
The foreach loop in PHP makes it easy to reformat this array for HTML display.
利用PHPforeach循环很容易改变数组的格式,以用HTML显示出来。
That’s the little bit of trigonometry code at the beginning of the foreach loop.
在foreach 循环的开始有一些三角函数的代码。
Because it is a Seq, it has a foreach method that takes a closure as a parameter.
因为它是一个Seq,它具有一个foreach方法,并将一个闭包作为参数。
Then, using a foreach statement, it lists the bare content of the section elements.
然后,使用一个foreach语句,列示那些section元素的纯内容。
The foreach command runs the script shown in curly braces for each file encountered.
foreach命令对每个文件执行大括号里面的脚本。
Then the foreach loop iterates through each data item and creates a new row with the data.
然后,foreach循环迭代通过每个数据项并利用数据创建一个新行。
It then iterates over the elements in the response, processing each one using a foreach loop.
它然后使用一个foreach循环,迭代处理响应中的每个元素。
We use a _ placeholder shortcut again in another function literal that we pass to foreach.
我们在传给foreach 的这个字面函数中再一次使用了一个 _占位符。
It's also called foreach, and sometimes enhanced for — but these all refer to the same construct.
它也被称为foreach,有时也叫作增强的for,但这些指的都是同一个构造。
Then, at the bottom of the file, I use a foreach iterator to walk through the list of traces in the data.
然后在文件的后面,使用foreach迭代器遍历数据中的轨迹列表。
The Listing 8 template illustrates the use of the #foreach directive with our $treeList ArrayList variable.
清单8 中的模板通过 $treeListArrayList变量演示了 #foreach指示符的用法。
The foreach loop then iterates through each of the user nodes and stores their attributes in the data array.
然后,foreach循环迭代通过每个用户节点,并将它们的属性存储在data数组中。
You can place a print statement within the loop to verify that data indeed exists at each element in the foreach loop.
可以在循环中放一个print语句,检验在foreach循环中每个元素中是否确实存在数据。
The notifyObservers method iterates through the observers, using the foreach method and calls receiveUpdate on each one.
notifyObservers方法遍历所有的观察者,使用foreach 方法,然后对每一个观察者调用receiveUpdate 方法。
In addition to the header line, you have a foreach loop in the EventTable method that iterates through each of the games.
除了标题行之外,在EventTable方法中还有一个foreach循环,它将在每个比赛上进行迭代。
Now, a "foreach" (list iterator or mapper) construct might not be as flexible as a "for" construct, but it is easier for us to understand.
现在,“foreach”(listiterator或者mapper)结构可能不像“for”结构那样灵活,但它更容易理解。
The array is filled using a series of foreach statements that pick out the root rule, master rules, and the rules that the masters refer to.
数组是用一系列foreach语句填充的,该语句挑出根规则、主规则以及主规则引用的规则。
Next, you have a PHP foreach loop, which loops through each outputted line and renders it nicely into XHTML, ready for the browser to display.
接下来,是一个PHPforeach循环,它循环遍历每个输出行并将其很好地呈现成XHTML,供浏览器显示。
In all cases, the return value of the method can be processed using a foreach loop, and you can also access specific values by key as needed.
所有方法的返回值都可用foreach循环来处理,需要的话也可按键访问特定的值。
The foreach script shown above can't handle this problem, because the file names are so irregular. Yet rename can process it in a few keystrokes.
上面的foreach脚本无法处理这个问题,因为这些文件名毫无规律可循。
The missing list on the foreach line isn't a typo: If you omit a list, the foreach structure processes the list of arguments given on the command line.
foreach行上缺少的列表并不是输入错误:如果您省略某个列表,则foreach结构将处理命令行上给出的参数列表。
Because Apache Commons HttpClient wants the POST request body to be done in NameValuePairs, we iterate through the elements of the map using the foreach call.
由于ApacheCommonsHttpClient要求POST请求的主体放在NameValuePairs中,因此我们使用foreach调用遍历map的元素。
The getContent() method returns the actual content of the article as an array of paragraphs; PHP's foreach() loop makes it easy to reformat these paragraphs for HTML display.
getContent()方法将文章的实际内容作为段落数组返回,利用 PHPforeach()循环可以方便地将这些段落重新改为HTML显示。
It then iterates over the elements in the response, processing each one using a foreach loop and retrieving the information shown in Figure 1. Here's how each of the values was obtained.
然后遍历响应中的元素,使用foreach循环处理每个元素并检索如图1所示的信息。
You can also use a foreach loop which will be compiled into a similar code leveraging the IEnumerable interface of the Items Collection. Here is now how the new loop is executed internally.
你也能使用foreach循环语句,它会被编译为类似的代码,其充分利用了Items集合的IEnumerable接口。
ForEach is a container activity, as figure 4 shows.
ForEach是一个容器活动,如图4所示。
应用推荐