Replacement: Creating a new parallel array by replacing each element with another derived from it.
替换:将每个元素替换为由它派生的另一个元素,创建新的并行数组。
This function receives the match array as a parameter and returns a modified string that is used as a replacement.
那个函数则接收匹配到的数组作为参数,然后返回一个修改后的字符串作为替换。
They take in a function as a parameter to use when a match is found. This function receives the match array as a parameter and returns a modified string that is used as a replacement.
你可以为preg_replace_callback指定某个函数为参数,此函数能接收匹配结果数组为参数,并将数组修改后返回,作为替换的结果。
One case of replacement is sorting, where elements are replaced with different elements so that the resulting array is in sorted order (the built-in sort method is provided for this action).
替换的一种情况是排序,将元素替换为不同的元素,从而对其进行排序(内置的sort方法可用于此操作)。
Then, evaluate the input array $_POST['card'] to see which cards have been checked for replacement.
然后,计算输入array $_POST['card'],查看哪些牌已被选择用于替换。
Note: the keys in the replacement array are not preserved.
注意:用于替代的数组中,键并不保留。
If several arrays are passed for replacement, they will be processed in order, the later array overwriting the previous values.
如果传递了多个替换数组,它们将被按顺序依次处理,后面的数组将覆盖之前的值。
If several arrays are passed for replacement, they will be processed in order, the later array overwriting the previous values.
如果传递了多个替换数组,它们将被按顺序依次处理,后面的数组将覆盖之前的值。
应用推荐