XSLT lets you select only the nodes you want and also sort them as well.
@ Edwin wrote:
Hello,
"Chris" <[EMAIL PROTECTED]> wrote:
I'm trying to write PHP code that will not only parse the XML but alsoI'm not sure if I really understand but let me try...
allow me to sort the parsed information by the values parsed.
...[snip code]...
Adding echo '<table border="1">'; before this and
$xml_parser = xml_parser_create();...[snip code]...
after this
xml_parser_free($xml_parser);echo '</table>';
shows a good view that you have a table with two columns.
If you'd like to sort these, then I think you might be able to do something
like this:
1. Instead of printf()'ing your <td>'s or <tr>'s inside the class/function,
why don't you try "putting" it inside an array? (Maybe with array_push() or
something.) Then,
2. If you already have an array, perhaps you can use one of the functions
here for sorting:
http://www.php.net/manual/en/ref.array.php
HTH,
- E
...[snip]...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php