开发者

p_split help in string?

开发者 https://www.devze.com 2022-12-11 01:27 出处:网络
<?PHP SMARTTAG(\'<PHP:DataSource ID=\"Da开发者_如何学运维taSource1\" CommandText=\"SELECT * FROM login\" Adapter=\"Adapter1\"></PHP:DataSource>\');
<?PHP 
SMARTTAG('<PHP:DataSource ID="Da开发者_如何学运维taSource1" CommandText="SELECT * FROM login" Adapter="Adapter1"></PHP:DataSource>');
?>

how to use p_split or other function that result

type=DataSource
attr=ID="DataSource1"
attr=CommandText="SELECT * FROM login"
attr=Adapter="Adapter1"

i try

function SplitTag($xstring) {
  $xsplit = array();
  $xsplit = preg_split("/\s+/", $xstring);
  print_r($xsplit);
}

but not work for attr=CommandText="SELECT * FROM login"


Why not use a simple XML parser for this?

0

精彩评论

暂无评论...
验证码 换一张
取 消