Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Passing PHP variables to $mm_xls->setXML statement

Community Beginner ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

328
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

"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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

LATEST
Thanks Dave, I made it a lot harder then it was.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines