tags:

views:

28

answers:

1
<?PHP 
SMARTTAG('<PHP:DataSource ID="DataSource1" 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"

A: 

Why not use a simple XML parser for this?

JP