如何分割下面的字符串
MAX_checkSite_Variable('type|101', '=~') or MAX_checkSite_Variable('county|0880', '=~')
分成两个单独的字符串
MAX_checkSite_Variable('type|101', '=~')
MAX_checkSite_Variable('county|0880', '=~')
答案 0 :(得分:1)
答案 1 :(得分:1)
<?php
$str = "MAX_checkSite_Variable('type|101', '=~') or MAX_checkSite_Variable('county|0880', '=~')";
print_r(explode(' or ', $str));
//Output: Array ( [0] => MAX_checkSite_Variable('type|101', '=~') [1] => MAX_checkSite_Variable('county|0880', '=~') )
?>