Ok, I'm trying to seperate my php from my html....  the method I've been
trying to use is like so:

$html = fread(fopen("htmlpage.html", "r"), filesize("htmlpage.html"));
print $html;


This works perfectly fine, except if I want to use a variable....

lets say that my htmlpage.html includes the following:

<CENTER><H2>Hello! Your variable has a value of: $myvar</H2></CENTER>

and my test.php file is as follows:

<?php
$myvar = "It works!";
$html = fread(fopen("htmlpage.html", "r"), filesize("htmlpage.html"));
print $html;
?>

I would expect the output to be:

Hello! Your variable has a value of: It works!

but what I get is:

Hello! Your variable has a value of: $myvar


any hints/tips/suggestions?  Is there another way that I should be doing
this?

thanks!

Jason




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to