I've found the solution to resolve my need while writing the str_replace function for processing the multi array as first two arguments of str_replace built-in function(although its pass each array of argument 1 & 2)
<?php
function p_str_replace($argFind, $agrReplace, $theString) {
$needle_replace = $theString; array_walk($argFind, function($val, $key) use(&$needle_replace, $agrReplace) {
$needle_replace = call_user_func_array('str_replace', array($val, $agrReplace[$key], $needle_replace));
});
return $needle_replace;
}
$the_str = array(
'coa' => ':col: :op1: :val: AND :col: :op2: :val:'
);
$ope = array('>=', '<=');
$colsdata = array('date_start', '2015-10-14');
echo p_str_replace(array(
array(':col:', ':val:'),
array(':op1:', ':op2:')
), array(
$colsdata,
$ope
), $the_str['coa']);
echo '-------------------------------' . "\n";
$complex = '(:col: :op1: :val: AND :col: :op2: :val:) AND (:col2: :op1: :val2: AND :col2: :op1: :val2:)';
echo p_str_replace(array(
array(':col:', ':val:'),
array(':col2:', ':val2:'),
array(':op1:', ':op2:')
), array(
array('date_start', '2015-10-01'),
array('date_end', '2015-10-14'),
array('>', '<')
), $complex);
?>
Sorry about my bad English :)
Hope this help someone.