开发者

p_split help in string?

<?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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜