note 20846 added to function.xslt-process

From: Date: Thu, 18 Apr 2002 10:04:03 +0000
Subject: note 20846 added to function.xslt-process
Groups: php.notes 
Request: Send a blank email to php-notes+get-29519@lists.php.net to get a copy of this message
This function's syntax has changed since PHP 4.0.x, here is a quick workaround for those who use a same script with various versions. Note that in order to work with PHP 4.0.x, the commented part must not be directly within the code (or a parse error will occur). This is why I commented it out here and call this bit of code via an include. // PHP 4.0.6/4.1.x difference $minor = explode(".",phpversion()); if($minor[1] >= 1) // PHP 4.1.x -- preferred { include("php412_XSLT.php"); /* here is the included code $arguments = array( '/_xml' => $final_xml, '/_xsl' => $xsl_content ); $html_out = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); end of included code */ } else // PHP 4.0.6 -- works okay xslt_process($xsl_content, $final_xml,$html_out); echo $html_out; -- http://www.php.net/manual/en/function.xslt-process.php http://master.php.net/manage/user-notes.php?action=edit+20846 http://master.php.net/manage/user-notes.php?action=delete+20846 http://master.php.net/manage/user-notes.php?action=reject+20846

« previous php.notes (#29519) next »