我已将搜索工具栏添加到我的jqGrid中,并且想知道是否有搜索某些列而不是所有列?
默认情况下,搜索工具栏会显示每列的搜索字段.
我基本上想使用str_replace多维数组的所有值。我似乎无法解决如何针对多维数组执行此操作。当值是一个数组时,似乎有点陷入永无止境的循环中,我有点卡住了。我是php的新手,所以特别有用。
function _replace_amp($post = array(), $new_post = array())
{
foreach($post as $key => $value)
{
if (is_array($value))
{
unset($post[$key]);
$this->_replace_amp($post, $new_post);
}
else
{
// Replace :amp; for & as the & would split into different vars.
$new_post[$key] = str_replace(':amp;', '&', $value);
unset($post[$key]);
}
}
return $new_post;
}
Run Code Online (Sandbox Code Playgroud)
谢谢