这是我的代码:
$css = ".block{float:right; text-align:right;padding:0 20px 0 0; margin:0 0 0 0;}.block h2{font-size:24px; color:#2b7538; font-weight:normal; text-align:right; padding:10px; margin:10px 0 0 0; text-align:left}.block p{line-height:30px;margin-top:20px; float:left}";
$search = array("float:left","text-align:left","float:right","text-align:right");
$replace = array("float:right","text-align:right","float:left","text-align:left");
echo str_replace($search, $replace, $css);
如何同时替换从左到右和从右到左?