this string is lastupdate BETWEEN @DAY and @DAY.I want to replace 2 @DAY with 11/15/2017 09:45 and 11/28/2017 12:23 by sequence
Expect Result => lastupdate BETWEEN 11/28/2017 12:23 and 11/28/2017 12:23
I used some code about this
$value_cond[0] => 11/15/2017 09:45
$value_cond[1] => 11/28/2017 12:23
$tmp_o[1] = 'lastupdate BETWEEN @DAY and @DAY';
$first = strpos($tmp_o[1],'@',0);//find @ first position
$output = substr_replace($tmp_o[1],$value_cond[0],$first);
$secound = strpos($tmp_o[1],'@',$first+1);//find @ next position
$output .= substr_replace($tmp_o[1],$value_cond[1],$secound);
dump($output);die();
and result from my code is
lastupdate BETWEEN 11/15/2017 09:45lastupdate BETWEEN @DAY and 11/28/2017 12:23
Please Help ,Thanks