【发布时间】:2011-12-12 10:04:00
【问题描述】:
$array = array(
array('foo_test1','demo_test1'),
array('foo_test2','demo_test2'),
array('blah_test1','exp_test1'),
array('blah_test2','exp_test2'),
array('foo_test3','demo_test3')
)
如何使用 php 和 regExp 获取包含 foo 子字符串及其值的所有子数组。
预期输出:
$array = array(
array('foo_test1','demo_test1'),
array('foo_test2','demo_test2'),
array('foo_test3','demo_test3')
)
【问题讨论】:
标签: regex arrays search substring