Class Combo - XML Generator for DHTMLX
$combo = new Combo( set encoding, default utf-8 )
$combo = new Combo;
or
$combo = new Combo('iso-8859-1');
add
$combo->add = "true";
$combo->option( array( 'key attribute' => 'value attribute' ) )
$combo->option(
array(
"value" => 1,
"css" => "font-weight:bold;",
"text" => "One"
)
);
$combo->header()
$combo->header();
return
header("Content-type: application/xml; charset=utf-8");
$combo->result()
echo $combo->result();
Print XML
<?php
include_once 'DHX.php';
$combo = new Combo;
$combo->option(
array(
"value" => 1,
"css" => "font-weight:bold;",
"text" => "One"
),
array(
"value" => 2,
"text" => "Two"
),
array(
"value" => 3,
"img_src" => "some.gif",
"text" => "Three"
),
array(
"value" => 4,
"cdata" => "<strong>four</strong>"
)
);
$combo->header();
echo $combo->result();
?>
Result
<?xml version="1.0" encoding="utf-8"?>
<complete>
<option value="1" css="font-weight:bold;">One</option>
<option value="2">Two</option>
<option value="3" img_src="some.gif">Three</option>
<option value="4">
<![CDATA[ <strong>four</strong> ]]>
</option>
</complete>
Lucas Tiago de Moraes