Re: Include file
| From: | Richard Davey | Date: | Wed, 30 Mar 2005 01:50:39 +0000 |
| Subject: | Re: Include file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211833@lists.php.net to get a copy of this message | ||
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