note 25621 deleted from function.xslt-process by sobak

From: Date: Tue, 22 Nov 2016 03:32:26 +0000
Subject: note 25621 deleted from function.xslt-process by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207347@lists.php.net to get a copy of this message
Note Submitter: jordigasulla at yahoo dot com ---- The output of the XSLT process doesn't have to be necessarily HTML. If you receive a lot of data in the XML and want to distribute it along all your page, you can convert all your page to XHTML or force the output to be PHP code and then eval()uated. For instance, your XSL document (part of it) could look like: <xsl:text disable-output-escaping="yes">$networth=</xsl:text><xsl:value-of select="networth" /><xsl:text disable-output-escaping="yes">;</xsl:text> and your PHP code could look like: $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); if ($result) { eval(addslashes($result)); that way, you can use the variable $networth in wherever you want inside your PHP file, like: <? print $networth; ?>

« previous php.notes (#207347) next »