Skip to main content
Participant
February 25, 2009
Answered

Passing PHP variables to $mm_xls->setXML statement

  • February 25, 2009
  • 2 replies
  • 367 views
Ugh! need some help

I am attempting to modify the $mm_xls->setXML line below to accept
a passed variable. The line works fine with a fixed path as shown below.

$mm_xsl->setXML("../xml_files/097.xml");

When I attempt to replace ------"../xml_files/097.xml"-----
with a passed variable -- noluck.

Below is one attempt, the passed variable is $colname_rs_for_gallery.
The $test_var works and yields the proper result, but it along with many
other variations don't seem to work in the $mm_xls->setXML statement.

Do I need different punctiontuation to correct the syntax?

<?php ---this was just a test segment---
$test_var='"../xml_files/'.$colname_rs_for_gallery.'.xml"';
echo $test_var;
?> --- the echo produced by the above "../xml_files/097.xml" which is what I wanted.

<?php
$mm_xsl = new MM_XSLTransform();
$mm_xsl->setXML(echo $test_var;); ------This is the line in question---
$mm_xsl->setXSL("../xml_files/gallery_fragment.xsl");
echo $mm_xsl->Transform();

Thanks Phil Fisher
This topic has been closed for replies.
Correct answer Newsgroup_User
"PT_Fisher" <webforumsuser@macromedia.com> wrote in message
news:go4dh3$1fn$1@forums.macromedia.com...
> $mm_xsl->setXML(echo $test_var;); ------This is the line in
> question---


Take out the echo. It should be this:

$mm_xsl->setXML($test_var);

--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com

2 replies

PT_FisherAuthor
Participant
February 26, 2009
Thanks Dave, I made it a lot harder then it was.
Newsgroup_UserCorrect answer
Inspiring
February 25, 2009
"PT_Fisher" <webforumsuser@macromedia.com> wrote in message
news:go4dh3$1fn$1@forums.macromedia.com...
> $mm_xsl->setXML(echo $test_var;); ------This is the line in
> question---


Take out the echo. It should be this:

$mm_xsl->setXML($test_var);

--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com