Re: Include file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Marquez,

Wednesday, March 30, 2005, 2:41:15 AM, you wrote:

MD> Does anyone know how to include a variable page? The variable is a page
MD> name. Such as "inluded_file.html"

MD> Include ('../includes/$include');

MD> Does not seem to work.

You cannot use variables inside single quotes. Try this:

include "../includes/$include";

Same goes for anything in PHP, i.e.:

$test = "apple";
$word1 = "eat the $test";
$word2 = 'eat the $test';

Try this and see the difference the quotes make.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux