[PHP] Running PHP script within stylesheet?

2002-06-10 Thread William S.

Sorry, perhaps I should have been a bit more specific.
Here is my *.php file. I want the hello world
script to output to the Right Menu table on
my web page: http://213.84.71.105/ .

?php
$xml = ./test.xml;
$xsl = ./test.xsl;

$_parser = xslt_create();
  
if( !$result = xslt_process(  $_parser,// resource xh
   $xml,// string xml
   $xsl,// string xsl
   NULL,// string result
   array(), // array arguments
   array()  // array parameters
 ) ) {
printf( Sablotron Error (%s): br /strong%s/strong,
xslt_errno($_parser), xslt_error($_parser) );
}
xslt_free($_parser); 
echo $result;
?
 
On Mon, Jun 10, 2002 at 02:23:21PM +0800, James wrote:
 It's quite easy to display a result within a table, here are two
 examples...

 ?php
   $myvar = Hello World;
 ?
 html
   body
   table
   tr
   td?= $myvar ?/td
   /tr
   /table
   /body
 /html

 ?= $var ? is the equivalent to ?php echo $var ?
snip

-- 
Bill
Amsterdam, NL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Running PHP script within stylesheet?

2002-06-09 Thread William S.

I am very new to PHP, Sablotron, XSLT, and MySql.
Right now I have created a web page that is the
result of a transformation (through php) of an
xsl and xml file.

What I would like to do is run a PHP script so
that the result is displayed within a table on my
web page. How do I do this? Here is an example:

$myvar = Hello World;
echo $myvar;

In which file do I put this script?
Here is a link to my page.

http://213.84.71.105/

This is just the first step in my learning process.
Ultimately, I would like to be able to query
a mysql database through a web interface.

Thank you,
-- 
Bill
Amsterdam, NL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php