Jump to content

3 Params in an Array in PHP (4)


kvnmck18

Recommended Posts

<?php$xmlFile = "xml.xml";$xsltFile = "xsl.xsl";$args = array("category" => $_GET['category'],  "type" => $_GET['type'], "localLinkAfter" => "&type=". $_GET['type']);$engine = xslt_create();$output = xslt_process($engine, $xmlFile, $xsltFile, NULL, NULL, $args);print $output;xslt_free($engine);?>

This only works for passing two params to the XSLT, anyone know how to get the third one to work?

Link to comment
Share on other sites

This works:

<?php$xmlFile = "xml.xml";$xsltFile = "xsl.xsl";$args = array("category" => $_GET['category'],  "type" => $_GET['type'], "localLinkAfter" => "&type=". $_GET['type'], "id" => $_GET['id'], "localLinkAfter" => "&id=". $_GET['id']);$engine = xslt_create();$output = xslt_process($engine, $xmlFile, $xsltFile, NULL, NULL, $args);print $output;xslt_free($engine);?>

I had this originally...but with one minor typo.I hate typos, makes you question everything.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...