note 14895 added to ref.xslt.php
| From: | nexus at mail dot ru | Date: | Mon, 20 Aug 2001 11:26:30 +0000 |
| Subject: | note 14895 added to ref.xslt.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16910@lists.php.net to get a copy of this message | ||
XSLT + SQL = BEST !!!
I've found good way to use xslt with MySQL.
Remember ! This code would not work as is, it's to illustrate technology.
1)you do : "select * from mytable"
2)then
---------------------------------------
$fld1=$result->fields[0]; // you can do "for" here :)
$fld_name1=$result->fieldname[0];// certainly fieldname function must return field name
$myxml.="<$fld_name1>$fld1</fld_name1>"
---------------------------------------
3) write your xsl stylesheet to apply selected data.
4) Apply xsl to $myxml :)
Work perfectly !!!
A lot of time saved :)
http://www.php.net/manual/en/ref.xslt.php