Hi to all
I use a cms and I want to modify an its module.
I need to pass a variable to a xml file (this xml is necessary for a flash slideshow), like the value of a folder like '/example'
If I create a system variable in php and then I recall it in xml, is it possible?

byee

Hi,

I'm not aware of the ability to pass a variable from PHP to XML.

One option to consider is to use PHP to generate the XML file. This would involve setting the correct content type headers so that when the PHP script is called, the resulting output is served as XML.

R.

Thanks blocblue

Do you know a simple good guide or site (URL) to learn how to use PHP to generate a XML file?
It's not so simple

byee

PHP has several inbuilt functions for producing XML. See the SimpleXML pages.

Alternatively, you can just do something like:

<?php

header('Content-type: text/xml');
$example = 'Example variable value';

echo "<?xml version="1.0"?>
<example>
    <variable>
        <value>{$example}</value>
    </variable>
</example>";

R.

thank you very much for your time
you're very kind

Now I've understood what you've said before (This would involve setting the correct content type headers so that when the PHP script is called, the resulting output is served as XML.)
It's the same thing to pass some variables to css file from php file

I'm glad to know you

byee

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.