If I write include $hello The page includes page.php?hello=page1.php But if I write include $hello + ".php" it tries to include zero. Why? Thanks, Bjorne
include $hello . ".php" is the correct version
to use include do this PHP Code: <? include($hello); ?> or PHP Code: <? require($hello); ?> now to add two varibles or a varible with text you do this PHP Code: <? //Variable with variable $var2 = $hello.$var; //Variable and text $var = $var2."this is text"; ?> so if you want to add the extition on $hllo do this PHP Code: <? include($hello.".php"); ?>
<? include($hello); ?>
<? require($hello); ?>
<? //Variable with variable $var2 = $hello.$var; //Variable and text $var = $var2."this is text"; ?>
<? include($hello.".php"); ?>
Help Traci have the wedding of her dreams Ramona Canyon WHR
PHP!==Javascript U also can do something like this and probably this is easiest way PHP Code: $var='name' echo "$var and txt"; #prints name and txt echo '$var and txt'; #prints $var and txt ~Say FiQ
$var='name' echo "$var and txt"; #prints name and txt echo '$var and txt'; #prints $var and txt
Last edited by C0NF0RTY; July 5th, 2003 at 07:10 PM.
Forum Rules
Bookmarks