Shawn McKenzie wrote:
I'm having a brain fart here:

---file.php
$myvar = "Hello!";
$stuff = file_get_contents("file.html");
echo $stuff;

---file.html
<b>$myvar</b>

Any ideas why when $stuff is echoed I get $myvar and not Hello?

It's because you're echoing the contents of a variable, not evaluating it. Wasn't this already covered today, only pulling the string from a database?


Either way, in your case you can simply say:

include('file.html');

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com



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



Reply via email to