...

View Full Version : include (file) ?



Taipan
04-06-2004, 01:33 AM
I need to use the include function but I need the file name to use a variable as part of it. ie,

include ('/folder/$var.inc');

but this doesn't work and I can't figure how to do it. Any hints, tips would be appreciated.

Nightfire
04-06-2004, 01:35 AM
Variables aren't parsed in single quotes, you can either change them to double quotes or do something like


<?php
include('/folder/'.$var.'.inc');
?>

Taipan
04-06-2004, 02:04 AM
thanks .. I am embarrased at the simplicity of the answer, appreciate you help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum