您好需要在一个特殊函数中相交两个数组。这两个数组是:
Array A (
[0] => 104-20_140.1 [1] => 104-10_136.1 [2] => 104-40_121.1 [3] => 104-41_122.1
[4] => 200-42_951.1 [5] => 200-43_952.1 [6] => 200-44_123.1 [7] => 200-45_124.1
[8] => 300-46_125.1 [9] => 300-47_126.1 [10] => 300-48_127.1 [11] => 300-49_128.1
[9] => 380-56_125.1 [10] => 380-57_126.1 [11] => 380-58_127.1 [12] => 380-59_128.1
)
Array B (
[0] => 200 [1] => 300
)
我需要两次查看数组 A 的值的开头。前任。[0] => 104 -20_140 并查看开头的“ 104 ”是否存在于数组 B 中。如果不是,则数组 A 应将其从结果数组 C 中删除。
数组 A 和 B 的输出应具有:
Array C (
[0] => 200-42_951.1 [1] => 200-43_952.1 [2] => 200-44_123.1 [3] => 200-45_124.1
[4] => 300-46_125.1 [5] => 300-47_126.1 [6] => 300-48_127.1 [7] => 300-49_128.1
)
全部以 PHP 计算
谢谢所有的帮助!