php中怎么把变量php隐藏的变量解析出来? 财富值29

2016-10-25 22:42发布

$a = " #0 and #1 or (#0)"; $items = array(     "a>1",     "b>0" ); $str = preg_replace("/#(w+)/","$items[$1]",$a); echo $str;

输出结果: $items[0] and $items[1] or ($items[0])

怎么才能让输出结果是:a>1 and b>0 or (a>1)?
请各位大神帮忙看一下,谢谢!

0条回答

一周热门 更多>