基于数组构建字典对象 Creating a dictionary Object from an Array
您可以将这个对象作为一个方法—或一个方法的结果—的参数,而无须构建数组在UI和服务之间传递数据。
You can use the object as an argument to a method - or the result of a method - without building arrays to pass data between the UI and services.
while 语句将逐个遍历结果查询的每个元素并逐行构建 $encodable 数组。
The while statement steps through each element of the result query and builds the $encodable array line by line.
在清单5中,我们在调用期间动态地构建了数组引用,然后在打印结果时使用OID作为散列键。
In Listing 5 we build the array reference dynamically during the call, and then use the OID as the hash key when printing out the result.
应用推荐